if(!AmCharts)var AmCharts={themes:{},maps:{},inheriting:{},charts:[],onReadyArray:[],useUTC:!1,updateRate:40,uid:0,lang:{},translations:{},mapTranslations:{},windows:{},initHandlers:[]};AmCharts.Class=function(t){var e=function(){arguments[0]!==AmCharts.inheriting&&(this.events={},this.construct.apply(this,arguments))};t.inherits?(e.prototype=new t.inherits(AmCharts.inheriting),e.base=t.inherits.prototype,delete t.inherits):(e.prototype.createEvents=function(){for(var t=0,e=arguments.length;t<e;t++)this.events[arguments[t]]=[]},e.prototype.listenTo=function(t,e,i){this.removeListener(t,e,i);t.events[e].push({handler:i,scope:this})},e.prototype.addListener=function(t,e,i){this.removeListener(this,t,e);this.events[t].push({handler:e,scope:i})},e.prototype.removeListener=function(t,e,i){if(t&&t.events)for(t=t.events[e],e=t.length-1;0<=e;e--)t[e].handler===i&&t.splice(e,1)},e.prototype.fire=function(t,e){for(var i=this.events[t],s=0,a=i.length;s<a;s++){var r=i[s];r.handler.call(r.scope,e)}});for(var i in t)e.prototype[i]=t[i];return e};AmCharts.addChart=function(t){AmCharts.charts.push(t)};AmCharts.removeChart=function(t){for(var e=AmCharts.charts,i=e.length-1;0<=i;i--)e[i]==t&&e.splice(i,1)};AmCharts.isModern=!0;AmCharts.getIEVersion=function(){var t=0;if("Microsoft Internet Explorer"==navigator.appName){var e=navigator.userAgent,i=/MSIE ([0-9]{1,}[.0-9]{0,})/;null!=i.exec(e)&&(t=parseFloat(RegExp.$1))}else"Netscape"==navigator.appName&&(e=navigator.userAgent,i=/Trident\/.*rv:([0-9]{1,}[.0-9]{0,})/,null!=i.exec(e)&&(t=parseFloat(RegExp.$1)));return t};AmCharts.applyLang=function(t,e){var i=AmCharts.translations;e.dayNames=AmCharts.dayNames;e.shortDayNames=AmCharts.shortDayNames;e.monthNames=AmCharts.monthNames;e.shortMonthNames=AmCharts.shortMonthNames;i&&(i=i[t])&&(AmCharts.lang=i,i.monthNames&&(e.dayNames=i.dayNames,e.shortDayNames=i.shortDayNames,e.monthNames=i.monthNames,e.shortMonthNames=i.shortMonthNames))};AmCharts.IEversion=AmCharts.getIEVersion();9>AmCharts.IEversion&&0<AmCharts.IEversion&&(AmCharts.isModern=!1,AmCharts.isIE=!0);AmCharts.dx=0;AmCharts.dy=0;if(document.addEventListener||window.opera)AmCharts.isNN=!0,AmCharts.isIE=!1,AmCharts.dx=.5,AmCharts.dy=.5;document.attachEvent&&(AmCharts.isNN=!1,AmCharts.isIE=!0,AmCharts.isModern||(AmCharts.dx=0,AmCharts.dy=0));window.chrome&&(AmCharts.chrome=!0);AmCharts.handleResize=function(){for(var t=AmCharts.charts,e=0;e<t.length;e++){var i=t[e];i&&i.div&&i.handleResize()}};AmCharts.handleMouseUp=function(t){for(var e=AmCharts.charts,i=0;i<e.length;i++){var s=e[i];s&&s.handleReleaseOutside&&s.handleReleaseOutside(t)}};AmCharts.handleMouseMove=function(t){for(var e=AmCharts.charts,i=0;i<e.length;i++){var s=e[i];s&&s.handleMouseMove&&s.handleMouseMove(t)}};AmCharts.handleWheel=function(t){for(var e=AmCharts.charts,i=0;i<e.length;i++){var s=e[i];if(s&&s.mouseIsOver){s.mouseWheelScrollEnabled||s.mouseWheelZoomEnabled?s.handleWheel&&s.handleWheel(t):t.stopPropagation&&t.stopPropagation();break}}};AmCharts.resetMouseOver=function(){for(var t=AmCharts.charts,e=0;e<t.length;e++){var i=t[e];i&&(i.mouseIsOver=!1)}};AmCharts.ready=function(t){AmCharts.onReadyArray.push(t)};AmCharts.handleLoad=function(){AmCharts.isReady=!0;for(var t=AmCharts.onReadyArray,e=0;e<t.length;e++){var i=t[e];isNaN(AmCharts.processDelay)?i():setTimeout(i,AmCharts.processDelay*e)}};AmCharts.addInitHandler=function(t,e){AmCharts.initHandlers.push({method:t,types:e})};AmCharts.callInitHandler=function(t){var e=AmCharts.initHandlers;if(AmCharts.initHandlers)for(var i=0;i<e.length;i++){var s=e[i];s.types?AmCharts.isInArray(s.types,t.type)&&s.method(t):s.method(t)}};AmCharts.getUniqueId=function(){AmCharts.uid++;return"AmChartsEl-"+AmCharts.uid};AmCharts.isNN&&(document.addEventListener("mousemove",AmCharts.handleMouseMove,!0),window.addEventListener("resize",AmCharts.handleResize,!0),window.addEventListener("orientationchange",AmCharts.handleResize,!0),document.addEventListener("mouseup",AmCharts.handleMouseUp,!0),window.addEventListener("load",AmCharts.handleLoad,!0),window.addEventListener("DOMMouseScroll",AmCharts.handleWheel,!0),document.addEventListener("mousewheel",AmCharts.handleWheel,!0));AmCharts.isIE&&(document.attachEvent("onmousemove",AmCharts.handleMouseMove),window.attachEvent("onresize",AmCharts.handleResize),document.attachEvent("onmouseup",AmCharts.handleMouseUp),window.attachEvent("onload",AmCharts.handleLoad));AmCharts.clear=function(){var t=AmCharts.charts;if(t)for(var e=0;e<t.length;e++)t[e].clear();AmCharts.charts=null;AmCharts.isNN&&(document.removeEventListener("mousemove",AmCharts.handleMouseMove,!0),window.removeEventListener("resize",AmCharts.handleResize,!0),document.removeEventListener("mouseup",AmCharts.handleMouseUp,!0),window.removeEventListener("load",AmCharts.handleLoad,!0),window.removeEventListener("DOMMouseScroll",AmCharts.handleWheel,!0),document.removeEventListener("mousewheel",AmCharts.handleWheel,!0));AmCharts.isIE&&(document.detachEvent("onmousemove",AmCharts.handleMouseMove),window.detachEvent("onresize",AmCharts.handleResize),document.detachEvent("onmouseup",AmCharts.handleMouseUp),window.detachEvent("onload",AmCharts.handleLoad))};AmCharts.makeChart=function(t,e,i){var s=e.type,a=e.theme;AmCharts.isString(a)&&(a=AmCharts.themes[a],e.theme=a);var r;switch(s){case"serial":r=new AmCharts.AmSerialChart(a);break;case"xy":r=new AmCharts.AmXYChart(a);break;case"pie":r=new AmCharts.AmPieChart(a);break;case"radar":r=new AmCharts.AmRadarChart(a);break;case"gauge":r=new AmCharts.AmAngularGauge(a);break;case"funnel":r=new AmCharts.AmFunnelChart(a);break;case"map":r=new AmCharts.AmMap(a);break;case"stock":r=new AmCharts.AmStockChart(a)}AmCharts.extend(r,e);AmCharts.isReady?isNaN(i)?r.write(t):setTimeout(function(){AmCharts.realWrite(r,t)},i):AmCharts.ready(function(){isNaN(i)?r.write(t):setTimeout(function(){AmCharts.realWrite(r,t)},i)});return r};AmCharts.realWrite=function(t,e){t.write(e)};AmCharts.bezierX=3;AmCharts.bezierY=6;AmCharts.toBoolean=function(t,e){if(void 0===t)return e;switch(String(t).toLowerCase()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case null:return!1;default:return Boolean(t)}};AmCharts.removeFromArray=function(t,e){var i;if(void 0!=e&&void 0!=t)for(i=t.length-1;0<=i;i--)t[i]==e&&t.splice(i,1)};AmCharts.isInArray=function(t,e){for(var i=0;i<t.length;i++)if(t[i]==e)return!0;return!1};AmCharts.getDecimals=function(t){var e=0;isNaN(t)||(t=String(t),-1!=t.indexOf("e-")?e=Number(t.split("-")[1]):-1!=t.indexOf(".")&&(e=t.split(".")[1].length));return e};AmCharts.wrappedText=function(t,e,i,s,a,r,h,o,n){var l=AmCharts.text(t,e,i,s,a,r,h),d="\n";AmCharts.isModern||(d="<br>");if(10<n)return l;if(l){var c=l.getBBox();if(c.width>o){c=Math.ceil(c.width/o);l.remove();for(var l=[],u=0;-1<(index=e.indexOf(" ",u));)l.push(index),u=index+1;Math.round(e.length/2);for(var m,u=0;u<l.length;u+=Math.ceil(l.length/c))m=l[u],e=e.substr(0,m)+d+e.substr(m+1);if(isNaN(m)){if(0==n)for(u=1;u<c;u++)m=Math.round(e.length/c*u),e=e.substr(0,m)+d+e.substr(m);return AmCharts.text(t,e,i,s,a,r,h)}return AmCharts.wrappedText(t,e,i,s,a,r,h,o,n+1)}return l}};AmCharts.getStyle=function(t,e){var i="";document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,"").getPropertyValue(e):t.currentStyle&&(e=e.replace(/\-(\w)/g,function(t,e){return e.toUpperCase()}),i=t.currentStyle[e]);return i};AmCharts.removePx=function(t){if(void 0!=t)return Number(t.substring(0,t.length-2))};AmCharts.getURL=function(t,e){if(t)if("_self"!=e&&e)if("_top"==e&&window.top)window.top.location.href=t;else if("_parent"==e&&window.parent)window.parent.location.href=t;else if("_blank"==e)window.open(t);else{var i=document.getElementsByName(e)[0];i?i.src=t:(i=AmCharts.windows[e])?i.opener&&!i.opener.closed?i.location.href=t:AmCharts.windows[e]=window.open(t):AmCharts.windows[e]=window.open(t)}else window.location.href=t};AmCharts.ifArray=function(t){return t&&0<t.length?!0:!1};AmCharts.callMethod=function(t,e){var i;for(i=0;i<e.length;i++){var s=e[i];if(s){if(s[t])s[t]();var a=s.length;if(0<a){var r;for(r=0;r<a;r++){var h=s[r];if(h&&h[t])h[t]()}}}}};AmCharts.toNumber=function(t){return"number"==typeof t?t:Number(String(t).replace(/[^0-9\-.]+/g,""))};AmCharts.toColor=function(t){if(""!==t&&void 0!==t)if(-1!=t.indexOf(",")){t=t.split(",");var e;for(e=0;e<t.length;e++){var i=t[e].substring(t[e].length-6,t[e].length);t[e]="#"+i}}else t=t.substring(t.length-6,t.length),t="#"+t;return t};AmCharts.toCoordinate=function(t,e,i){var s;void 0!==t&&(t=String(t),i&&i<e&&(e=i),s=Number(t),-1!=t.indexOf("!")&&(s=e-Number(t.substr(1))),-1!=t.indexOf("%")&&(s=e*Number(t.substr(0,t.length-1))/100));return s};AmCharts.fitToBounds=function(t,e,i){t<e&&(t=e);t>i&&(t=i);return t};AmCharts.isDefined=function(t){return void 0===t?!1:!0};AmCharts.stripNumbers=function(t){return t.replace(/[0-9]+/g,"")};AmCharts.roundTo=function(t,e){if(0>e)return t;var i=Math.pow(10,e);return Math.round(t*i)/i};AmCharts.toFixed=function(t,e){var i=String(Math.round(t*Math.pow(10,e)));if(0<e){var s=i.length;if(s<e){var a;for(a=0;a<e-s;a++)i="0"+i}s=i.substring(0,i.length-e);""===s&&(s=0);return s+"."+i.substring(i.length-e,i.length)}return String(i)};AmCharts.formatDuration=function(t,e,i,s,a,r){var h=AmCharts.intervals,o=r.decimalSeparator;if(t>=h[e].contains){var n=t-Math.floor(t/h[e].contains)*h[e].contains;"ss"==e&&(n=AmCharts.formatNumber(n,r),1==n.split(o)[0].length&&(n="0"+n));("mm"==e||"hh"==e)&&10>n&&(n="0"+n);i=n+""+s[e]+""+i;t=Math.floor(t/h[e].contains);e=h[e].nextInterval;return AmCharts.formatDuration(t,e,i,s,a,r)}"ss"==e&&(t=AmCharts.formatNumber(t,r),1==t.split(o)[0].length&&(t="0"+t));("mm"==e||"hh"==e)&&10>t&&(t="0"+t);i=t+""+s[e]+""+i;if(h[a].count>h[e].count)for(t=h[e].count;t<h[a].count;t++)e=h[e].nextInterval,"ss"==e||"mm"==e||"hh"==e?i="00"+s[e]+""+i:"DD"==e&&(i="0"+s[e]+""+i);":"==i.charAt(i.length-1)&&(i=i.substring(0,i.length-1));return i};AmCharts.formatNumber=function(t,e,i,s,a){t=AmCharts.roundTo(t,e.precision);isNaN(i)&&(i=e.precision);var r=e.decimalSeparator;e=e.thousandsSeparator;var h;h=0>t?"-":"";t=Math.abs(t);var o=String(t),n=!1;-1!=o.indexOf("e")&&(n=!0);0<=i&&!n&&(o=AmCharts.toFixed(t,i));var l="";if(n)l=o;else{var o=o.split("."),n=String(o[0]),d;for(d=n.length;0<=d;d-=3)l=d!=n.length?0!==d?n.substring(d-3,d)+e+l:n.substring(d-3,d)+l:n.substring(d-3,d);void 0!==o[1]&&(l=l+r+o[1]);void 0!==i&&0<i&&"0"!=l&&(l=AmCharts.addZeroes(l,r,i))}l=h+l;""===h&&!0===s&&0!==t&&(l="+"+l);!0===a&&(l+="%");return l};AmCharts.addZeroes=function(t,e,i){t=t.split(e);void 0===t[1]&&0<i&&(t[1]="0");return t[1].length<i?(t[1]+="0",AmCharts.addZeroes(t[0]+e+t[1],e,i)):void 0!==t[1]?t[0]+e+t[1]:t[0]};AmCharts.scientificToNormal=function(t){var e;t=String(t).split("e");var i;if("-"==t[1].substr(0,1)){e="0.";for(i=0;i<Math.abs(Number(t[1]))-1;i++)e+="0";e+=t[0].split(".").join("")}else{var s=0;e=t[0].split(".");e[1]&&(s=e[1].length);e=t[0].split(".").join("");for(i=0;i<Math.abs(Number(t[1]))-s;i++)e+="0"}return e};AmCharts.toScientific=function(t,e){if(0===t)return"0";var i=Math.floor(Math.log(Math.abs(t))*Math.LOG10E);Math.pow(10,i);mantissa=String(mantissa).split(".").join(e);return String(mantissa)+"e"+i};AmCharts.randomColor=function(){return"#"+("00000"+(16777216*Math.random()<<0).toString(16)).substr(-6)};AmCharts.hitTest=function(t,e,i){var s=!1,a=t.x,r=t.x+t.width,h=t.y,o=t.y+t.height,n=AmCharts.isInRectangle;s||(s=n(a,h,e));s||(s=n(a,o,e));s||(s=n(r,h,e));s||(s=n(r,o,e));s||!0===i||(s=AmCharts.hitTest(e,t,!0));return s};AmCharts.isInRectangle=function(t,e,i){return t>=i.x-5&&t<=i.x+i.width+5&&e>=i.y-5&&e<=i.y+i.height+5?!0:!1};AmCharts.isPercents=function(t){if(-1!=String(t).indexOf("%"))return!0};AmCharts.findPosX=function(t){var e=t,i=t.offsetLeft;if(t.offsetParent){for(;t=t.offsetParent;)i+=t.offsetLeft;for(;(e=e.parentNode)&&e!=document.body;)i-=e.scrollLeft||0}return i};AmCharts.findPosY=function(t){var e=t,i=t.offsetTop;if(t.offsetParent){for(;t=t.offsetParent;)i+=t.offsetTop;for(;(e=e.parentNode)&&e!=document.body;)i-=e.scrollTop||0}return i};AmCharts.findIfFixed=function(t){if(t.offsetParent)for(;t=t.offsetParent;)if("fixed"==AmCharts.getStyle(t,"position"))return!0;return!1};AmCharts.findIfAuto=function(t){return t.style&&"auto"==AmCharts.getStyle(t,"overflow")?!0:t.parentNode?AmCharts.findIfAuto(t.parentNode):!1};AmCharts.findScrollLeft=function(t,e){t.scrollLeft&&(e+=t.scrollLeft);return t.parentNode?AmCharts.findScrollLeft(t.parentNode,e):e};AmCharts.findScrollTop=function(t,e){t.scrollTop&&(e+=t.scrollTop);return t.parentNode?AmCharts.findScrollTop(t.parentNode,e):e};AmCharts.formatValue=function(t,e,i,s,a,r,h,o){if(e){void 0===a&&(a="");var n;for(n=0;n<i.length;n++){var l=i[n],d=e[l];void 0!==d&&(d=r?AmCharts.addPrefix(d,o,h,s):AmCharts.formatNumber(d,s),t=t.replace(new RegExp("\\[\\["+a+""+l+"\\]\\]","g"),d))}}return t};AmCharts.formatDataContextValue=function(t,e){if(t){var i=t.match(/\[\[.*?\]\]/g),s;for(s=0;s<i.length;s++){var a=i[s],a=a.substr(2,a.length-4);void 0!==e[a]&&(t=t.replace(new RegExp("\\[\\["+a+"\\]\\]","g"),e[a]))}}return t};AmCharts.massReplace=function(t,e){for(var i in e)if(e.hasOwnProperty(i)){var s=e[i];void 0===s&&(s="");t=t.replace(i,s)}return t};AmCharts.cleanFromEmpty=function(t){return t.replace(/\[\[[^\]]*\]\]/g,"")};AmCharts.addPrefix=function(t,e,i,s,a){var r=AmCharts.formatNumber(t,s),h="",o,n,l;if(0===t)return"0";0>t&&(h="-");t=Math.abs(t);if(1<t)for(o=e.length-1;-1<o;o--){if(t>=e[o].number&&(n=t/e[o].number,l=Number(s.precision),1>l&&(l=1),i=AmCharts.roundTo(n,l),l=AmCharts.formatNumber(i,{precision:-1,decimalSeparator:s.decimalSeparator,thousandsSeparator:s.thousandsSeparator}),!a||n==i)){r=h+""+l+""+e[o].prefix;break}}else for(o=0;o<i.length;o++)if(t<=i[o].number){n=t/i[o].number;l=Math.abs(Math.round(Math.log(n)*Math.LOG10E));n=AmCharts.roundTo(n,l);r=h+""+n+""+i[o].prefix;break}return r};AmCharts.remove=function(t){t&&t.remove()};AmCharts.recommended=function(){var t="js";document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")||swfobject&&swfobject.hasFlashPlayerVersion("8")&&(t="flash");return t};AmCharts.getEffect=function(t){">"==t&&(t="easeOutSine");"<"==t&&(t="easeInSine");"elastic"==t&&(t="easeOutElastic");return t};AmCharts.getObjById=function(t,e){var i,s;for(s=0;s<t.length;s++){var a=t[s];a.id==e&&(i=a)}return i};AmCharts.applyTheme=function(t,e,i){e||(e=AmCharts.theme);e&&e[i]&&AmCharts.extend(t,e[i])};AmCharts.isString=function(t){return"string"==typeof t?!0:!1};AmCharts.extend=function(t,e,i){for(var s in e)i?t.hasOwnProperty(s)||(t[s]=e[s]):t[s]=e[s];return t};AmCharts.copyProperties=function(t,e){for(var i in t)t.hasOwnProperty(i)&&"events"!=i&&void 0!==t[i]&&"function"!=typeof t[i]&&"cname"!=i&&(e[i]=t[i])};AmCharts.processObject=function(t,e,i){!1===t instanceof e&&(t=AmCharts.extend(new e(i),t));return t};AmCharts.fixNewLines=function(t){var e=RegExp("\\n","g");t&&(t=t.replace(e,"<br />"));return t};AmCharts.fixBrakes=function(t){if(AmCharts.isModern){var e=RegExp("<br>","g");t&&(t=t.replace(e,"\n"))}else t=AmCharts.fixNewLines(t);return t};AmCharts.deleteObject=function(t,e){if(t){if(void 0===e||null===e)e=20;if(0!==e)if("[object Array]"===Object.prototype.toString.call(t))for(var i=0;i<t.length;i++)AmCharts.deleteObject(t[i],e-1),t[i]=null;else if(t&&!t.tagName)try{for(i in t)t[i]&&("object"==typeof t[i]&&AmCharts.deleteObject(t[i],e-1),"function"!=typeof t[i]&&(t[i]=null))}catch(s){}}};AmCharts.bounce=function(t,e,i,s,a){return(e/=a)<1/2.75?7.5625*s*e*e+i:e<2/2.75?s*(7.5625*(e-=1.5/2.75)*e+.75)+i:e<2.5/2.75?s*(7.5625*(e-=2.25/2.75)*e+.9375)+i:s*(7.5625*(e-=2.625/2.75)*e+.984375)+i};AmCharts.easeInSine=function(t,e,i,s,a){return-s*Math.cos(e/a*(Math.PI/2))+s+i};AmCharts.easeOutSine=function(t,e,i,s,a){return s*Math.sin(e/a*(Math.PI/2))+i};AmCharts.easeOutElastic=function(t,e,i,s,a){t=1.70158;var r=0,h=s;if(0===e)return i;if(1==(e/=a))return i+s;r||(r=.3*a);h<Math.abs(s)?(h=s,t=r/4):t=r/(2*Math.PI)*Math.asin(s/h);return h*Math.pow(2,-10*e)*Math.sin(2*(e*a-t)*Math.PI/r)+s+i};AmCharts.fixStepE=function(t){t=t.toExponential(0).split("e");var e=Number(t[1]);9==Number(t[0])&&e++;return AmCharts.generateNumber(1,e)};AmCharts.generateNumber=function(t,e){var i="",s;s=0>e?Math.abs(e)-1:Math.abs(e);var a;for(a=0;a<s;a++)i+="0";return 0>e?Number("0."+i+String(t)):Number(String(t)+i)};AmCharts.setCN=function(t,e,i,s){if(t.addClassNames&&e&&(e=e.node)&&i){var a=e.getAttribute("class");t=t.classNamePrefix+"-";s&&(t="");a?e.setAttribute("class",a+" "+t+i):e.setAttribute("class",t+i)}};AmCharts.parseDefs=function(t,e){for(var i in t){var s=typeof t[i];if(0<t[i].length&&"object"==s)for(s=0;s<t[i].length;s++){var a=document.createElementNS(AmCharts.SVG_NS,i);e.appendChild(a);AmCharts.parseDefs(t[i][s],a)}else"object"==s?(a=document.createElementNS(AmCharts.SVG_NS,i),e.appendChild(a),AmCharts.parseDefs(t[i],a)):e.setAttribute(i,t[i])}};AmCharts.AxisBase=AmCharts.Class({construct:function(t){this.createEvents("clickItem","rollOverItem","rollOutItem");this.viY=this.viX=this.y=this.x=this.dy=this.dx=0;this.axisThickness=1;this.axisColor="#000000";this.axisAlpha=1;this.gridCount=this.tickLength=5;this.gridAlpha=.15;this.gridThickness=1;this.gridColor="#000000";this.dashLength=0;this.labelFrequency=1;this.showLastLabel=this.showFirstLabel=!0;this.fillColor="#FFFFFF";this.fillAlpha=0;this.labelsEnabled=!0;this.labelRotation=0;this.autoGridCount=!0;this.offset=0;this.guides=[];this.visible=!0;this.counter=0;this.guides=[];this.ignoreAxisWidth=this.inside=!1;this.minHorizontalGap=75;this.minVerticalGap=35;this.titleBold=!0;this.minorGridEnabled=!1;this.minorGridAlpha=.07;this.autoWrap=!1;this.titleAlign="middle";this.labelOffset=0;this.bcn="axis-";this.theme=t;AmCharts.applyTheme(this,t,"AxisBase")},zoom:function(t,e){this.start=t;this.end=e;this.dataChanged=!0;this.draw()},fixAxisPosition:function(){var t=this.position;"H"==this.orientation?("left"==t&&(t="bottom"),"right"==t&&(t="top")):("bottom"==t&&(t="left"),"top"==t&&(t="right"));this.position=t},draw:function(){var t=this.chart;this.allLabels=[];this.counter=0;this.destroy();this.fixAxisPosition();this.labels=[];var e=t.container,i=e.set();t.gridSet.push(i);this.set=i;e=e.set();t.axesLabelsSet.push(e);this.labelsSet=e;this.axisLine=new this.axisRenderer(this);this.autoGridCount?("V"==this.orientation?(t=this.height/this.minVerticalGap,3>t&&(t=3)):t=this.width/this.minHorizontalGap,this.gridCountR=Math.max(t,1)):this.gridCountR=this.gridCount;this.axisWidth=this.axisLine.axisWidth;this.addTitle()},setOrientation:function(t){this.orientation=t?"H":"V"},addTitle:function(){var t=this.title;this.titleLabel=null;if(t){var e=this.chart,i=this.titleColor;void 0===i&&(i=e.color);var s=this.titleFontSize;isNaN(s)&&(s=e.fontSize+1);t=AmCharts.text(e.container,t,i,e.fontFamily,s,this.titleAlign,this.titleBold);AmCharts.setCN(e,t,this.bcn+"title");this.titleLabel=t}},positionTitle:function(){var t=this.titleLabel;if(t){var e,i,s=this.labelsSet,a={};0<s.length()?a=s.getBBox():(a.x=0,a.y=0,a.width=this.viW,a.height=this.viH);s.push(t);var s=a.x,r=a.y;AmCharts.VML&&(this.rotate?s-=this.x:r-=this.y);var h=a.width,a=a.height,o=this.viW,n=this.viH,l=0,d=t.getBBox().height/2,c=this.inside,u=this.titleAlign;switch(this.position){case"top":e="left"==u?-1:"right"==u?o:o/2;i=r-10-d;break;case"bottom":e="left"==u?-1:"right"==u?o:o/2;i=r+a+10+d;break;case"left":e=s-10-d;c&&(e-=5);i="left"==u?n+1:"right"==u?-1:n/2;l=-90;break;case"right":e=s+h+10+d-3,c&&(e+=7),i="left"==u?n+2:"right"==u?-2:n/2,l=-90}this.marginsChanged?(t.translate(e,i),this.tx=e,this.ty=i):t.translate(this.tx,this.ty);this.marginsChanged=!1;0!==l&&t.rotate(l)}},pushAxisItem:function(t,e){var i=this,s=t.graphics();0<s.length()&&(e?i.labelsSet.push(s):i.set.push(s));if(s=t.getLabel())this.labelsSet.push(s),s.click(function(e){i.handleMouse(e,t,"clickItem")}).mouseover(function(e){i.handleMouse(e,t,"rollOverItem")}).mouseout(function(e){i.handleMouse(e,t,"rollOutItem")})},handleMouse:function(t,e,i){this.fire(i,{type:i,value:e.value,serialDataItem:e.serialDataItem,axis:this,target:e.label,chart:this.chart,event:t})},addGuide:function(t){for(var e=this.guides,i=!1,s=e.length,a=0;a<e.length;a++)e[a]==t&&(i=!0,s=a);t=AmCharts.processObject(t,AmCharts.Guide,this.theme);t.id||(t.id="guideAuto"+s+"_"+(new Date).getTime());i||e.push(t)},removeGuide:function(t){var e=this.guides,i;for(i=0;i<e.length;i++)e[i]==t&&e.splice(i,1)},handleGuideOver:function(t){clearTimeout(this.chart.hoverInt);var e=t.graphics.getBBox(),i=e.x+e.width/2,e=e.y+e.height/2,s=t.fillColor;void 0===s&&(s=t.lineColor);this.chart.showBalloon(t.balloonText,s,!0,i,e)},handleGuideOut:function(t){this.chart.hideBalloon()},addEventListeners:function(t,e){var i=this;t.mouseover(function(){i.handleGuideOver(e)});t.touchstart(function(){i.handleGuideOver(e)});t.mouseout(function(){i.handleGuideOut(e)})},getBBox:function(){var t=this.labelsSet.getBBox();AmCharts.VML||(t={x:t.x+this.x,y:t.y+this.y,width:t.width,height:t.height});return t},destroy:function(){AmCharts.remove(this.set);AmCharts.remove(this.labelsSet);var t=this.axisLine;t&&AmCharts.remove(t.set);AmCharts.remove(this.grid0)}});AmCharts.ValueAxis=AmCharts.Class({inherits:AmCharts.AxisBase,construct:function(t){this.cname="ValueAxis";this.createEvents("axisChanged","logarithmicAxisFailed","axisSelfZoomed","axisZoomed");AmCharts.ValueAxis.base.construct.call(this,t);this.dataChanged=!0;this.stackType="none";this.position="left";this.unitPosition="right";this.recalculateToPercents=this.includeHidden=this.includeGuidesInMinMax=this.integersOnly=!1;this.durationUnits={DD:"d. ",hh:":",mm:":",ss:""};this.scrollbar=!1;this.baseValue=0;this.radarCategoriesEnabled=!0;this.gridType="polygons";this.useScientificNotation=!1;this.axisTitleOffset=10;this.minMaxMultiplier=1;this.logGridLimit=2;this.totalTextOffset=this.treatZeroAs=0;AmCharts.applyTheme(this,t,this.cname)},updateData:function(){0>=this.gridCountR&&(this.gridCountR=1);this.totals=[];this.data=this.chart.chartData;var t=this.chart;"xy"!=t.type&&(this.stackGraphs("smoothedLine"),this.stackGraphs("line"),this.stackGraphs("column"),this.stackGraphs("step"));this.recalculateToPercents&&this.recalculate();this.synchronizationMultiplier&&this.synchronizeWith?(AmCharts.isString(this.synchronizeWith)&&(this.synchronizeWith=t.getValueAxisById(this.synchronizeWith)),this.synchronizeWith&&(this.synchronizeWithAxis(this.synchronizeWith),this.foundGraphs=!0)):(this.foundGraphs=!1,this.getMinMax())},draw:function(){AmCharts.ValueAxis.base.draw.call(this);var t=this.chart,e=this.set;AmCharts.setCN(t,this.set,"value-axis value-axis-"+this.id);AmCharts.setCN(t,this.labelsSet,"value-axis value-axis-"+this.id);AmCharts.setCN(t,this.axisLine.axisSet,"value-axis value-axis-"+this.id);"duration"==this.type&&(this.duration="ss");!0===this.dataChanged&&(this.updateData(),this.dataChanged=!1);if(this.logarithmic){var i=this.treatZeroAs,s=this.getMin(0,this.data.length-1);0<i&&0==s&&(this.minReal=s=i);if(0>=s||0>=this.minimum){this.fire("logarithmicAxisFailed",{type:"logarithmicAxisFailed",chart:t});return}}this.grid0=null;var a,r,h=t.dx,o=t.dy,i=!1,s=this.logarithmic;if(isNaN(this.min)||isNaN(this.max)||!this.foundGraphs||Infinity==this.min||-Infinity==this.max)i=!0;else{var n=this.labelFrequency,l=this.showFirstLabel,d=this.showLastLabel,c=1,u=0,m=Math.round((this.max-this.min)/this.step)+1,p;!0===s?(p=Math.log(this.max)*Math.LOG10E-Math.log(this.minReal)*Math.LOG10E,this.stepWidth=this.axisWidth/p,p>this.logGridLimit&&(m=Math.ceil(Math.log(this.max)*Math.LOG10E)+1,u=Math.round(Math.log(this.minReal)*Math.LOG10E),m>this.gridCountR&&(c=Math.ceil(m/this.gridCountR)))):this.stepWidth=this.axisWidth/(this.max-this.min);var f=0;1>this.step&&-1<this.step&&(f=AmCharts.getDecimals(this.step));this.integersOnly&&(f=0);f>this.maxDecCount&&(f=this.maxDecCount);var g=this.precision;isNaN(g)||(f=g);this.max=AmCharts.roundTo(this.max,this.maxDecCount);this.min=AmCharts.roundTo(this.min,this.maxDecCount);r={};r.precision=f;r.decimalSeparator=t.nf.decimalSeparator;r.thousandsSeparator=t.nf.thousandsSeparator;this.numberFormatter=r;var v,C=this.guides;a=C.length;if(0<a){var A=this.fillAlpha;for(r=this.fillAlpha=0;r<a;r++){var b=C[r],x=NaN,N=b.above;isNaN(b.toValue)||(x=this.getCoordinate(b.toValue),v=new this.axisItemRenderer(this,x,"",!0,NaN,NaN,b),this.pushAxisItem(v,N));var y=NaN;isNaN(b.value)||(y=this.getCoordinate(b.value),v=new this.axisItemRenderer(this,y,b.label,!0,NaN,(x-y)/2,b),this.pushAxisItem(v,N));isNaN(x-y)||(v=new this.guideFillRenderer(this,y,x,b),this.pushAxisItem(v,N),v=v.graphics(),b.graphics=v,b.balloonText&&this.addEventListeners(v,b))}this.fillAlpha=A}this.exponential=!1;for(r=u;r<m;r+=c)C=AmCharts.roundTo(this.step*r+this.min,f),-1!=String(C).indexOf("e")&&(this.exponential=!0,String(C).split("e"));this.duration&&(this.maxInterval=AmCharts.getMaxInterval(this.max,this.duration));var f=this.step,w,C=this.minorGridAlpha;this.minorGridEnabled&&(w=this.getMinorGridStep(f,this.stepWidth*f));for(r=u;r<m;r+=c)if(u=f*r+this.min,s&&this.max-this.min>5*this.min&&(u-=this.min),u=AmCharts.roundTo(u,this.maxDecCount+1),!this.integersOnly||Math.round(u)==u)if(isNaN(g)||Number(AmCharts.toFixed(u,g))==u){!0===s&&(0===u&&(u=this.minReal),p>this.logGridLimit&&(u=Math.pow(10,r)));v=this.formatValue(u,!1,r);Math.round(r/n)!=r/n&&(v=void 0);if(0===r&&!l||r==m-1&&!d)v=" ";a=this.getCoordinate(u);v=new this.axisItemRenderer(this,a,v,void 0,void 0,void 0,void 0,this.boldLabels);this.pushAxisItem(v);if(u==this.baseValue&&"radar"!=t.type){var M,S,b=this.viW,N=this.viH;v=this.viX;A=this.viY;"H"==this.orientation?0<=a&&a<=b+1&&(M=[a,a,a+h],S=[N,0,o]):0<=a&&a<=N+1&&(M=[0,b,b+h],S=[a,a,a+o]);M&&(a=AmCharts.fitToBounds(2*this.gridAlpha,0,1),a=AmCharts.line(t.container,M,S,this.gridColor,a,1,this.dashLength),a.translate(v,A),this.grid0=a,t.axesSet.push(a),a.toBack(),AmCharts.setCN(t,a,this.bcn+"zero-grid-"+this.id),AmCharts.setCN(t,a,this.bcn+"zero-grid"))}if(!isNaN(w)&&0<C&&r<m-1){v=this.gridAlpha;this.gridAlpha=this.minorGridAlpha;for(a=1;a<f/w;a++)A=this.getCoordinate(u+w*a),A=new this.axisItemRenderer(this,A,"",!1,0,0,!1,!1,0,!0),this.pushAxisItem(A);this.gridAlpha=v}}p=this.baseValue;this.min>this.baseValue&&this.max>this.baseValue&&(p=this.min);this.min<this.baseValue&&this.max<this.baseValue&&(p=this.max);s&&p<this.minReal&&(p=this.minReal);this.baseCoord=this.getCoordinate(p);p={type:"axisChanged",target:this,chart:t};p.min=s?this.minReal:this.min;p.max=this.max;this.fire("axisChanged",p);this.axisCreated=!0}s=this.axisLine.set;p=this.labelsSet;this.positionTitle();"radar"!=t.type?(t=this.viX,w=this.viY,e.translate(t,w),p.translate(t,w)):s.toFront();!this.visible||i?(e.hide(),s.hide(),p.hide()):(e.show(),s.show(),p.show());this.axisY=this.y-this.viY;this.axisX=this.x-this.viX},formatValue:function(t,e,i){var s=this.exponential,a=this.logarithmic,r=this.numberFormatter,h=this.chart;!0===this.logarithmic&&(s=-1!=String(t).indexOf("e")?!0:!1);this.useScientificNotation&&(s=!0);this.usePrefixes&&(s=!1);s?(e=-1==String(t).indexOf("e")?t.toExponential(15):String(t),i=e.split("e"),e=Number(i[0]),i=Number(i[1]),e=AmCharts.roundTo(e,14),10==e&&(e=1,i+=1),e=e+"e"+i,0===t&&(e="0"),1==t&&(e="1")):(a&&(s=String(t).split("."),s[1]?(r.precision=s[1].length,0>i&&(r.precision=Math.abs(i))):r.precision=-1),e=this.usePrefixes?AmCharts.addPrefix(t,h.prefixesOfBigNumbers,h.prefixesOfSmallNumbers,r,!e):AmCharts.formatNumber(t,r,r.precision));this.duration&&(e=AmCharts.formatDuration(t,this.duration,"",this.durationUnits,this.maxInterval,r));this.recalculateToPercents?e+="%":(r=this.unit)&&(e="left"==this.unitPosition?r+e:e+r);this.labelFunction&&(e=this.labelFunction(t,e,this).toString());return e},getMinorGridStep:function(t,e){var i=[5,4,2];60>e&&i.shift();for(var s=Math.floor(Math.log(Math.abs(t))*Math.LOG10E),a=0;a<i.length;a++){var r=t/i[a],h=Math.floor(Math.log(Math.abs(r))*Math.LOG10E);if(!(0<Math.abs(s-h)))if(1>t){if(h=Math.pow(10,-h)*r,h==Math.round(h))return r}else if(r==Math.round(r))return r}},stackGraphs:function(t){var e=this.stackType;"stacked"==e&&(e="regular");"line"==e&&(e="none");"100% stacked"==e&&(e="100%");this.stackType=e;var i=[],s=[],a=[],r=[],h,o=this.chart.graphs,n,l,d,c,u=this.baseValue,m=!1;if("line"==t||"step"==t||"smoothedLine"==t)m=!0;if(m&&("regular"==e||"100%"==e))for(c=0;c<o.length;c++)d=o[c],d.hidden||(l=d.type,d.chart==this.chart&&d.valueAxis==this&&t==l&&d.stackable&&(n&&(d.stackGraph=n),n=d));for(n=this.start;n<=this.end;n++){var p=0;for(c=0;c<o.length;c++)if(d=o[c],d.hidden)d.newStack&&(a[n]=NaN,s[n]=NaN);else if(l=d.type,d.chart==this.chart&&d.valueAxis==this&&t==l&&d.stackable)if(l=this.data[n].axes[this.id].graphs[d.id],h=l.values.value,isNaN(h))d.newStack&&(a[n]=NaN,s[n]=NaN);else{var f=AmCharts.getDecimals(h);p<f&&(p=f);isNaN(r[n])?r[n]=Math.abs(h):r[n]+=Math.abs(h);r[n]=AmCharts.roundTo(r[n],p);f=d.fillToGraph;m&&f&&(f=this.data[n].axes[this.id].graphs[f.id])&&(l.values.open=f.values.value);"regular"==e&&(m&&(isNaN(i[n])?(i[n]=h,l.values.close=h,l.values.open=this.baseValue):(isNaN(h)?l.values.close=i[n]:l.values.close=h+i[n],l.values.open=i[n],i[n]=l.values.close)),"column"==t&&(d.newStack&&(a[n]=NaN,s[n]=NaN),l.values.close=h,0>h?(l.values.close=h,isNaN(s[n])?l.values.open=u:(l.values.close+=s[n],l.values.open=s[n]),s[n]=l.values.close):(l.values.close=h,isNaN(a[n])?l.values.open=u:(l.values.close+=a[n],l.values.open=a[n]),a[n]=l.values.close)))}}for(n=this.start;n<=this.end;n++)for(c=0;c<o.length;c++)(d=o[c],d.hidden)?d.newStack&&(a[n]=NaN,s[n]=NaN):(l=d.type,d.chart==this.chart&&d.valueAxis==this&&t==l&&d.stackable&&(l=this.data[n].axes[this.id].graphs[d.id],h=l.values.value,isNaN(h)||(i=h/r[n]*100,l.values.percents=i,l.values.total=r[n],d.newStack&&(a[n]=NaN,s[n]=NaN),"100%"==e&&(isNaN(s[n])&&(s[n]=0),isNaN(a[n])&&(a[n]=0),0>i?(l.values.close=AmCharts.fitToBounds(i+s[n],-100,100),l.values.open=s[n],s[n]=l.values.close):(l.values.close=AmCharts.fitToBounds(i+a[n],-100,100),l.values.open=a[n],a[n]=l.values.close)))))},recalculate:function(){var t=this.chart,e=t.graphs,i;for(i=0;i<e.length;i++){var s=e[i];if(s.valueAxis==this){var a="value";if("candlestick"==s.type||"ohlc"==s.type)a="open";var r,h,o=this.end+2,o=AmCharts.fitToBounds(this.end+1,0,this.data.length-1),n=this.start;0<n&&n--;var l;h=this.start;s.compareFromStart&&(h=0);if(!isNaN(t.startTime)&&(l=t.categoryAxis)){var d=l.minDuration(),d=new Date(t.startTime+d/2),c=AmCharts.resetDateToMin(new Date(t.startTime),l.minPeriod).getTime();AmCharts.resetDateToMin(new Date(d),l.minPeriod).getTime()>c&&h++}if(l=t.recalculateFromDate)t.dataDateFormat&&(l=AmCharts.stringToDate(l,t.dataDateFormat)),h=t.getClosestIndex(t.chartData,"time",l.getTime(),!0,0,t.chartData.length),o=t.chartData.length-1;for(l=h;l<=o&&(h=this.data[l].axes[this.id].graphs[s.id],r=h.values[a],isNaN(r));l++);this.recBaseValue=r;for(a=n;a<=o;a++){h=this.data[a].axes[this.id].graphs[s.id];h.percents={};var n=h.values,u;for(u in n)h.percents[u]="percents"!=u?n[u]/r*100-100:n[u]}}}},getMinMax:function(){var t=!1,e=this.chart,i=e.graphs,s;for(s=0;s<i.length;s++){var a=i[s].type;("line"==a||"step"==a||"smoothedLine"==a)&&this.expandMinMax&&(t=!0)}t&&(0<this.start&&this.start--,this.end<this.data.length-1&&this.end++);"serial"==e.type&&(!0!==e.categoryAxis.parseDates||t||this.end<this.data.length-1&&this.end++);t=this.minMaxMultiplier;this.min=this.getMin(this.start,this.end);this.max=this.getMax();t=(this.max-this.min)*(t-1);this.min-=t;this.max+=t;t=this.guides.length;if(this.includeGuidesInMinMax&&0<t)for(e=0;e<t;e++)i=this.guides[e],i.toValue<this.min&&(this.min=i.toValue),i.value<this.min&&(this.min=i.value),i.toValue>this.max&&(this.max=i.toValue),i.value>this.max&&(this.max=i.value);isNaN(this.minimum)||(this.min=this.minimum);isNaN(this.maximum)||(this.max=this.maximum);this.min>this.max&&(t=this.max,
this.max=this.min,this.min=t);isNaN(this.minTemp)||(this.min=this.minTemp);isNaN(this.maxTemp)||(this.max=this.maxTemp);this.minReal=this.min;this.maxReal=this.max;0===this.min&&0===this.max&&(this.max=9);this.min>this.max&&(this.min=this.max-1);t=this.min;e=this.max;i=this.max-this.min;s=0===i?Math.pow(10,Math.floor(Math.log(Math.abs(this.max))*Math.LOG10E))/10:Math.pow(10,Math.floor(Math.log(Math.abs(i))*Math.LOG10E))/10;isNaN(this.maximum)&&isNaN(this.maxTemp)&&(this.max=Math.ceil(this.max/s)*s+s);isNaN(this.minimum)&&isNaN(this.minTemp)&&(this.min=Math.floor(this.min/s)*s-s);0>this.min&&0<=t&&(this.min=0);0<this.max&&0>=e&&(this.max=0);"100%"==this.stackType&&(this.min=0>this.min?-100:0,this.max=0>this.max?0:100);i=this.max-this.min;s=Math.pow(10,Math.floor(Math.log(Math.abs(i))*Math.LOG10E))/10;this.step=Math.ceil(i/this.gridCountR/s)*s;i=Math.pow(10,Math.floor(Math.log(Math.abs(this.step))*Math.LOG10E));i=AmCharts.fixStepE(i);s=Math.ceil(this.step/i);5<s&&(s=10);5>=s&&2<s&&(s=5);this.step=Math.ceil(this.step/(i*s))*i*s;1>i?(this.maxDecCount=Math.abs(Math.log(Math.abs(i))*Math.LOG10E),this.maxDecCount=Math.round(this.maxDecCount),this.step=AmCharts.roundTo(this.step,this.maxDecCount+1)):this.maxDecCount=0;this.min=this.step*Math.floor(this.min/this.step);this.max=this.step*Math.ceil(this.max/this.step);0>this.min&&0<=t&&(this.min=0);0<this.max&&0>=e&&(this.max=0);1<this.minReal&&1<this.max-this.minReal&&(this.minReal=Math.floor(this.minReal));i=Math.pow(10,Math.floor(Math.log(Math.abs(this.minReal))*Math.LOG10E));0===this.min&&(this.minReal=i);0===this.min&&1<this.minReal&&(this.minReal=1);0<this.min&&0<this.minReal-this.step&&(this.minReal=this.min+this.step<this.minReal?this.min+this.step:this.min);i=Math.log(e)*Math.LOG10E-Math.log(t)*Math.LOG10E;this.logarithmic&&(2<i?(this.minReal=this.min=Math.pow(10,Math.floor(Math.log(Math.abs(t))*Math.LOG10E)),this.max=Math.pow(10,Math.ceil(Math.log(Math.abs(e))*Math.LOG10E))):(e=Math.pow(10,Math.floor(Math.log(Math.abs(this.min))*Math.LOG10E))/10,t=Math.pow(10,Math.floor(Math.log(Math.abs(t))*Math.LOG10E))/10,e<t&&(this.minReal=this.min=10*t)))},getMin:function(t,e){var i,s;for(s=t;s<=e;s++){var a=this.data[s].axes[this.id].graphs,r;for(r in a)if(a.hasOwnProperty(r)){var h=this.chart.getGraphById(r);if(h.includeInMinMax&&(!h.hidden||this.includeHidden)){isNaN(i)&&(i=Infinity);this.foundGraphs=!0;h=a[r].values;this.recalculateToPercents&&(h=a[r].percents);var o;if(this.minMaxField)o=h[this.minMaxField],o<i&&(i=o);else for(var n in h)h.hasOwnProperty(n)&&"percents"!=n&&"total"!=n&&(o=h[n],o<i&&(i=o))}}}return i},getMax:function(){var t,e;for(e=this.start;e<=this.end;e++){var i=this.data[e].axes[this.id].graphs,s;for(s in i)if(i.hasOwnProperty(s)){var a=this.chart.getGraphById(s);if(a.includeInMinMax&&(!a.hidden||this.includeHidden)){isNaN(t)&&(t=-Infinity);this.foundGraphs=!0;a=i[s].values;this.recalculateToPercents&&(a=i[s].percents);var r;if(this.minMaxField)r=a[this.minMaxField],r>t&&(t=r);else for(var h in a)a.hasOwnProperty(h)&&"percents"!=h&&"total"!=h&&(r=a[h],r>t&&(t=r))}}}return t},dispatchZoomEvent:function(t,e){var i={type:"axisZoomed",startValue:t,endValue:e,target:this,chart:this.chart};this.fire(i.type,i)},zoomToValues:function(t,e){if(e<t){var i=e;e=t;t=i}t<this.min&&(t=this.min);e>this.max&&(e=this.max);i={type:"axisSelfZoomed"};i.chart=this.chart;i.valueAxis=this;i.multiplier=this.axisWidth/Math.abs(this.getCoordinate(e)-this.getCoordinate(t));i.position="V"==this.orientation?this.reversed?this.getCoordinate(t):this.getCoordinate(e):this.reversed?this.getCoordinate(e):this.getCoordinate(t);this.fire(i.type,i)},coordinateToValue:function(t){if(isNaN(t))return NaN;var e=this.axisWidth,i=this.stepWidth,s=this.reversed,a=this.rotate,r=this.min,h=this.minReal;return!0===this.logarithmic?Math.pow(10,(a?!0===s?(e-t)/i:t/i:!0===s?t/i:(e-t)/i)+Math.log(h)*Math.LOG10E):!0===s?a?r-(t-e)/i:t/i+r:a?t/i+r:r-(t-e)/i},getCoordinate:function(t){if(isNaN(t))return NaN;var e=this.rotate,i=this.reversed,s=this.axisWidth,a=this.stepWidth,r=this.min,h=this.minReal;!0===this.logarithmic?(0==t&&(t=this.treatZeroAs),t=Math.log(t)*Math.LOG10E-Math.log(h)*Math.LOG10E,e=e?!0===i?s-a*t:a*t:!0===i?a*t:s-a*t):e=!0===i?e?s-a*(t-r):a*(t-r):e?a*(t-r):s-a*(t-r);e=this.rotate?e+(this.x-this.viX):e+(this.y-this.viY);1e7<Math.abs(e)&&(e=1e7*(e/Math.abs(e)));return Math.round(e)},synchronizeWithAxis:function(t){this.synchronizeWith=t;this.listenTo(this.synchronizeWith,"axisChanged",this.handleSynchronization)},handleSynchronization:function(t){var e=this.synchronizeWith;t=e.min;var i=e.max,e=e.step,s=this.synchronizationMultiplier;s&&(this.min=t*s,this.max=i*s,this.step=e*s,t=Math.pow(10,Math.floor(Math.log(Math.abs(this.step))*Math.LOG10E)),t=Math.abs(Math.log(Math.abs(t))*Math.LOG10E),this.maxDecCount=t=Math.round(t),this.draw())}});AmCharts.RecAxis=AmCharts.Class({construct:function(t){var e=t.chart,i=t.axisThickness,s=t.axisColor,a=t.axisAlpha,r=t.offset,h=t.dx,o=t.dy,n=t.viX,l=t.viY,d=t.viH,c=t.viW,u=e.container;"H"==t.orientation?(s=AmCharts.line(u,[0,c],[0,0],s,a,i),this.axisWidth=t.width,"bottom"==t.position?(o=i/2+r+d+l-1,i=n):(o=-i/2-r+l+o,i=h+n)):(this.axisWidth=t.height,"right"==t.position?(s=AmCharts.line(u,[0,0,-h],[0,d,d-o],s,a,i),o=l+o,i=i/2+r+h+c+n-1):(s=AmCharts.line(u,[0,0],[0,d],s,a,i),o=l,i=-i/2-r+n));s.translate(i,o);i=e.container.set();i.push(s);e.axesSet.push(i);AmCharts.setCN(e,s,t.bcn+"line");this.axisSet=i;this.set=s}});AmCharts.RecItem=AmCharts.Class({construct:function(t,e,i,s,a,r,h,o,n,l,d,c){e=Math.round(e);var u=t.chart;this.value=i;void 0==i&&(i="");n||(n=0);void 0==s&&(s=!0);var m=u.fontFamily,p=t.fontSize;void 0==p&&(p=u.fontSize);var f=t.color;void 0==f&&(f=u.color);void 0!==d&&(f=d);var g=t.chart.container,v=g.set();this.set=v;var C=t.axisThickness,A=t.axisColor,b=t.axisAlpha,x=t.tickLength,N=t.gridAlpha,y=t.gridThickness,w=t.gridColor,M=t.dashLength,S=t.fillColor,T=t.fillAlpha,D=t.labelsEnabled;d=t.labelRotation;var B=t.counter,L=t.inside,k=t.labelOffset,O=t.dx,R=t.dy,I=t.orientation,F=t.position,z=t.previousCoord,E=t.viH,G=t.viW,P=t.offset,W,V;h?(void 0!=h.id&&(c=u.classNamePrefix+"-guide-"+h.id),D=!0,isNaN(h.tickLength)||(x=h.tickLength),void 0!=h.lineColor&&(w=h.lineColor),void 0!=h.color&&(f=h.color),isNaN(h.lineAlpha)||(N=h.lineAlpha),isNaN(h.dashLength)||(M=h.dashLength),isNaN(h.lineThickness)||(y=h.lineThickness),!0===h.inside&&(L=!0),isNaN(h.labelRotation)||(d=h.labelRotation),isNaN(h.fontSize)||(p=h.fontSize),h.position&&(F=h.position),void 0!==h.boldLabel&&(o=h.boldLabel),isNaN(h.labelOffset)||(k=h.labelOffset)):""===i&&(x=0);var H="start";a&&(H="middle");var Y=d*Math.PI/180,X,U,j=0,Z=0,q=0,_=X=0,K=0;"V"==I&&(d=0);var Q;D&&(Q=t.autoWrap&&0===d?AmCharts.wrappedText(g,i,f,m,p,H,o,a,0):AmCharts.text(g,i,f,m,p,H,o),H=Q.getBBox(),_=H.width,K=H.height);if("H"==I){if(0<=e&&e<=G+1&&(0<x&&0<b&&e+n<=G+1&&(W=AmCharts.line(g,[e+n,e+n],[0,x],A,b,y),v.push(W)),0<N&&(V=AmCharts.line(g,[e,e+O,e+O],[E,E+R,R],w,N,y,M),v.push(V))),Z=0,j=e,h&&90==d&&L&&(j-=p),!1===s?(H="start",Z="bottom"==F?L?Z+x:Z-x:L?Z-x:Z+x,j+=3,a&&(j+=a/2-3,H="middle"),0<d&&(H="middle")):H="middle",1==B&&0<T&&!h&&!l&&z<G&&(s=AmCharts.fitToBounds(e,0,G),z=AmCharts.fitToBounds(z,0,G),X=s-z,0<X&&(U=AmCharts.rect(g,X,t.height,S,T),U.translate(s-X+O,R),v.push(U))),"bottom"==F?(Z+=E+p/2+P,L?(0<d?(Z=E-_/2*Math.sin(Y)-x-3,j+=_/2*Math.cos(Y)-4+2):0>d?(Z=E+_*Math.sin(Y)-x-3+2,j+=-_*Math.cos(Y)-K*Math.sin(Y)-4):Z-=x+p+3+3,Z-=k):(0<d?(Z=E+_/2*Math.sin(Y)+x+3,j-=_/2*Math.cos(Y)):0>d?(Z=E+x+3-_/2*Math.sin(Y)+2,j+=_/2*Math.cos(Y)):Z+=x+C+3+3,Z+=k)):(Z+=R+p/2-P,j+=O,L?(0<d?(Z=_/2*Math.sin(Y)+x+3,j-=_/2*Math.cos(Y)):Z+=x+3,Z+=k):(0<d?(Z=-(_/2)*Math.sin(Y)-x-6,j+=_/2*Math.cos(Y)):Z-=x+p+3+C+3,Z-=k)),"bottom"==F?X=(L?E-x-1:E+C-1)+P:(q=O,X=(L?R:R-x-C+1)-P),r&&(j+=r),r=j,0<d&&(r+=_/2*Math.cos(Y)),Q&&(p=0,L&&(p=_/2*Math.cos(Y)),r+p>G+2||0>r))Q.remove(),Q=null}else{0<=e&&e<=E+1&&(0<x&&0<b&&e+n<=E+1&&(W=AmCharts.line(g,[0,x],[e+n,e+n],A,b,y),v.push(W)),0<N&&(V=AmCharts.line(g,[0,O,G+O],[e,e+R,e+R],w,N,y,M),v.push(V)));H="end";if(!0===L&&"left"==F||!1===L&&"right"==F)H="start";Z=e-p/2;1==B&&0<T&&!h&&!l&&(s=AmCharts.fitToBounds(e,0,E),z=AmCharts.fitToBounds(z,0,E),Y=s-z,U=AmCharts.polygon(g,[0,t.width,t.width,0],[0,0,Y,Y],S,T),U.translate(O,s-Y+R),v.push(U));Z+=p/2;"right"==F?(j+=O+G+P,Z+=R,L?(r||(Z-=p/2+3),j=j-(x+4)-k):(j+=x+4+C,Z-=2,j+=k)):L?(j+=x+4-P,r||(Z-=p/2+3),h&&(j+=O,Z+=R),j+=k):(j+=-x-C-4-2-P,Z-=2,j-=k);W&&("right"==F?(q+=O+P+G,X+=R,q=L?q-C:q+C):(q-=P,L||(q-=x+C)));r&&(Z+=r);L=-3;"right"==F&&(L+=R);Q&&(Z>E+1||Z<L)&&(Q.remove(),Q=null)}W&&(W.translate(q,X),AmCharts.setCN(u,W,t.bcn+"tick"),AmCharts.setCN(u,W,c,!0),h&&AmCharts.setCN(u,W,"guide"));!1===t.visible&&(W&&W.remove(),Q&&(Q.remove(),Q=null));Q&&(Q.attr({"text-anchor":H}),Q.translate(j,Z),0!==d&&Q.rotate(-d,t.chart.backgroundColor),t.allLabels.push(Q),this.label=Q,AmCharts.setCN(u,Q,t.bcn+"label"),AmCharts.setCN(u,Q,c,!0),h&&AmCharts.setCN(u,Q,"guide"));V&&(AmCharts.setCN(u,V,t.bcn+"grid"),AmCharts.setCN(u,V,c,!0),h&&AmCharts.setCN(u,V,"guide"));U&&(AmCharts.setCN(u,U,t.bcn+"fill"),AmCharts.setCN(u,U,c,!0));l?V&&AmCharts.setCN(u,V,t.bcn+"grid-minor"):(t.counter=0===B?1:0,t.previousCoord=e);0===this.set.node.childNodes.length&&this.set.remove()},graphics:function(){return this.set},getLabel:function(){return this.label}});AmCharts.RecFill=AmCharts.Class({construct:function(t,e,i,s){var a=t.dx,r=t.dy,h=t.orientation,o=0;if(i<e){var n=e;e=i;i=n}var l=s.fillAlpha;isNaN(l)&&(l=0);var n=t.chart.container,d=s.fillColor;"V"==h?(e=AmCharts.fitToBounds(e,0,t.viH),i=AmCharts.fitToBounds(i,0,t.viH)):(e=AmCharts.fitToBounds(e,0,t.viW),i=AmCharts.fitToBounds(i,0,t.viW));i-=e;isNaN(i)&&(i=4,o=2,l=0);0>i&&"object"==typeof d&&(d=d.join(",").split(",").reverse());"V"==h?(h=AmCharts.rect(n,t.viW,i,d,l),h.translate(a,e-o+r)):(h=AmCharts.rect(n,i,t.viH,d,l),h.translate(e-o+a,r));AmCharts.setCN(t.chart,h,"guide-fill");s.id&&AmCharts.setCN(t.chart,h,"guide-fill-"+s.id);this.set=n.set([h])},graphics:function(){return this.set},getLabel:function(){}});AmCharts.AmChart=AmCharts.Class({construct:function(t){this.theme=t;this.classNamePrefix="amcharts";this.addClassNames=!1;this.version="3.13.3";AmCharts.addChart(this);this.createEvents("dataUpdated","init","rendered","drawn","failed","resized");this.height=this.width="100%";this.dataChanged=!0;this.chartCreated=!1;this.previousWidth=this.previousHeight=0;this.backgroundColor="#FFFFFF";this.borderAlpha=this.backgroundAlpha=0;this.color=this.borderColor="#000000";this.fontFamily="Verdana";this.fontSize=11;this.usePrefixes=!1;this.precision=-1;this.percentPrecision=2;this.decimalSeparator=".";this.thousandsSeparator=",";this.labels=[];this.allLabels=[];this.titles=[];this.marginRight=this.marginLeft=this.autoMarginOffset=0;this.timeOuts=[];this.creditsPosition="top-left";var e=document.createElement("div"),i=e.style;i.overflow="hidden";i.position="relative";i.textAlign="left";this.chartDiv=e;e=document.createElement("div");i=e.style;i.overflow="hidden";i.position="relative";i.textAlign="left";this.legendDiv=e;this.titleHeight=0;this.hideBalloonTime=150;this.handDrawScatter=2;this.handDrawThickness=1;this.prefixesOfBigNumbers=[{number:1e3,prefix:"k"},{number:1e6,prefix:"M"},{number:1e9,prefix:"G"},{number:1e12,prefix:"T"},{number:1e15,prefix:"P"},{number:1e18,prefix:"E"},{number:1e21,prefix:"Z"},{number:1e24,prefix:"Y"}];this.prefixesOfSmallNumbers=[{number:1e-24,prefix:"y"},{number:1e-21,prefix:"z"},{number:1e-18,prefix:"a"},{number:1e-15,prefix:"f"},{number:1e-12,prefix:"p"},{number:1e-9,prefix:"n"},{number:1e-6,prefix:"μ"},{number:.001,prefix:"m"}];this.panEventsEnabled=!0;this.product="amcharts";this.animations=[];this.balloon=new AmCharts.AmBalloon(this.theme);this.balloon.chart=this;AmCharts.applyTheme(this,t,"AmChart")},drawChart:function(){this.drawBackground();this.redrawLabels();this.drawTitles();this.brr()},drawBackground:function(){AmCharts.remove(this.background);var t=this.container,e=this.backgroundColor,i=this.backgroundAlpha,s=this.set;AmCharts.isModern||0!==i||(i=.001);var a=this.updateWidth();this.realWidth=a;var r=this.updateHeight();this.realHeight=r;e=AmCharts.polygon(t,[0,a-1,a-1,0],[0,0,r-1,r-1],e,i,1,this.borderColor,this.borderAlpha);AmCharts.setCN(this,e,"bg");this.background=e;s.push(e);if(e=this.backgroundImage)this.path&&(e=this.path+e),t=t.image(e,0,0,a,r),AmCharts.setCN(this,e,"bg-image"),this.bgImg=t,s.push(t)},drawTitles:function(){var t=this.titles;if(AmCharts.ifArray(t)){var e=20,i;for(i=0;i<t.length;i++){var s=t[i],s=AmCharts.processObject(s,AmCharts.Title,this.theme);if(!1!==s.enabled){var a=s.color;void 0===a&&(a=this.color);var r=s.size;isNaN(r)&&(r=this.fontSize+2);isNaN(s.alpha);var h=this.marginLeft,a=AmCharts.text(this.container,s.text,a,this.fontFamily,r);a.translate(h+(this.realWidth-this.marginRight-h)/2,e);a.node.style.pointerEvents="none";AmCharts.setCN(this,a,"title");s.id&&AmCharts.setCN(this,a,"title-"+s.id);h=!0;void 0!==s.bold&&(h=s.bold);h&&a.attr({"font-weight":"bold"});a.attr({opacity:s.alpha});e+=r+6;this.freeLabelsSet.push(a)}}}},write:function(t){if(t="object"!=typeof t?document.getElementById(t):t){for(;t.firstChild;)t.removeChild(t.firstChild);this.div=t;t.style.overflow="hidden";t.style.textAlign="left";var e=this.chartDiv,i=this.legendDiv,s=this.legend,a=i.style,r=e.style;this.measure();var h,o=document.createElement("div");h=o.style;h.position="relative";this.containerDiv=o;o.className=this.classNamePrefix+"-main-div";e.className=this.classNamePrefix+"-chart-div";t.appendChild(o);var n=this.exportConfig;n&&AmCharts.AmExport&&!this.AmExport&&(this.AmExport=new AmCharts.AmExport(this,n));this.amExport&&AmCharts.AmExport&&(this.AmExport=AmCharts.extend(this.amExport,new AmCharts.AmExport(this),!0));this.AmExport&&this.AmExport.init&&this.AmExport.init();if(s)if(s=this.addLegend(s,s.divId),s.enabled)switch(s.position){case"bottom":o.appendChild(e);o.appendChild(i);break;case"top":o.appendChild(i);o.appendChild(e);break;case"absolute":h.width=t.style.width;h.height=t.style.height;a.position="absolute";r.position="absolute";void 0!==s.left&&(a.left=s.left+"px");void 0!==s.right&&(a.right=s.right+"px");void 0!==s.top&&(a.top=s.top+"px");void 0!==s.bottom&&(a.bottom=s.bottom+"px");s.marginLeft=0;s.marginRight=0;o.appendChild(e);o.appendChild(i);break;case"right":h.width=t.style.width;h.height=t.style.height;a.position="relative";r.position="absolute";o.appendChild(e);o.appendChild(i);break;case"left":h.width=t.style.width;h.height=t.style.height;a.position="absolute";r.position="relative";o.appendChild(e);o.appendChild(i);break;case"outside":o.appendChild(e)}else o.appendChild(e);else o.appendChild(e);this.listenersAdded||(this.addListeners(),this.listenersAdded=!0);this.initChart()}},createLabelsSet:function(){AmCharts.remove(this.labelsSet);this.labelsSet=this.container.set();this.freeLabelsSet.push(this.labelsSet)},initChart:function(){this.initHC||(AmCharts.callInitHandler(this),this.initHC=!0);this.renderFix();AmCharts.applyLang(this.language,this);var t=this.numberFormatter;t&&(isNaN(t.precision)||(this.precision=t.precision),void 0!==t.thousandsSeparator&&(this.thousandsSeparator=t.thousandsSeparator),void 0!==t.decimalSeparator&&(this.decimalSeparator=t.decimalSeparator));(t=this.percentFormatter)&&!isNaN(t.precision)&&(this.percentPrecision=t.precision);this.nf={precision:this.precision,thousandsSeparator:this.thousandsSeparator,decimalSeparator:this.decimalSeparator};this.pf={precision:this.percentPrecision,thousandsSeparator:this.thousandsSeparator,decimalSeparator:this.decimalSeparator};this.divIsFixed=AmCharts.findIfFixed(this.chartDiv);this.previousHeight=this.divRealHeight;this.previousWidth=this.divRealWidth;this.destroy();this.startInterval();t=0;document.attachEvent&&!window.opera&&(t=1);this.dmouseX=this.dmouseY=0;var e=document.getElementsByTagName("html")[0];e&&window.getComputedStyle&&(e=window.getComputedStyle(e,null))&&(this.dmouseY=AmCharts.removePx(e.getPropertyValue("margin-top")),this.dmouseX=AmCharts.removePx(e.getPropertyValue("margin-left")));this.mouseMode=t;(t=this.container)?(t.container.innerHTML="",t.width=this.realWidth,t.height=this.realHeight,t.addDefs(this),this.chartDiv.appendChild(t.container)):t=new AmCharts.AmDraw(this.chartDiv,this.realWidth,this.realHeight,this);t.chart=this;AmCharts.VML||AmCharts.SVG?(t.handDrawn=this.handDrawn,t.handDrawScatter=this.handDrawScatter,t.handDrawThickness=this.handDrawThickness,this.container=t,this.set&&this.set.remove(),this.set=t.set(),this.gridSet&&this.gridSet.remove(),this.gridSet=t.set(),this.cursorLineSet&&this.cursorLineSet.remove(),this.cursorLineSet=t.set(),this.graphsBehindSet&&this.graphsBehindSet.remove(),this.graphsBehindSet=t.set(),this.bulletBehindSet&&this.bulletBehindSet.remove(),this.bulletBehindSet=t.set(),this.columnSet&&this.columnSet.remove(),this.columnSet=t.set(),this.graphsSet&&this.graphsSet.remove(),this.graphsSet=t.set(),this.trendLinesSet&&this.trendLinesSet.remove(),this.trendLinesSet=t.set(),this.axesSet&&this.axesSet.remove(),this.axesSet=t.set(),this.cursorSet&&this.cursorSet.remove(),this.cursorSet=t.set(),this.scrollbarsSet&&this.scrollbarsSet.remove(),this.scrollbarsSet=t.set(),this.bulletSet&&this.bulletSet.remove(),this.bulletSet=t.set(),this.freeLabelsSet&&this.freeLabelsSet.remove(),this.axesLabelsSet&&this.axesLabelsSet.remove(),this.axesLabelsSet=t.set(),this.freeLabelsSet=t.set(),this.balloonsSet&&this.balloonsSet.remove(),this.balloonsSet=t.set(),this.zoomButtonSet&&this.zoomButtonSet.remove(),this.zoomButtonSet=t.set(),this.linkSet&&this.linkSet.remove(),this.linkSet=t.set()):this.fire("failed",{type:"failed",chart:this})},measure:function(){var t=this.div;if(t){var e=this.chartDiv,i=t.offsetWidth,s=t.offsetHeight,a=this.container;t.clientHeight&&(i=t.clientWidth,s=t.clientHeight);var r=AmCharts.removePx(AmCharts.getStyle(t,"padding-left")),h=AmCharts.removePx(AmCharts.getStyle(t,"padding-right")),o=AmCharts.removePx(AmCharts.getStyle(t,"padding-top")),n=AmCharts.removePx(AmCharts.getStyle(t,"padding-bottom"));isNaN(r)||(i-=r);isNaN(h)||(i-=h);isNaN(o)||(s-=o);isNaN(n)||(s-=n);r=t.style;t=r.width;r=r.height;-1!=t.indexOf("px")&&(i=AmCharts.removePx(t));-1!=r.indexOf("px")&&(s=AmCharts.removePx(r));t=AmCharts.toCoordinate(this.width,i);r=AmCharts.toCoordinate(this.height,s);this.balloon=AmCharts.processObject(this.balloon,AmCharts.AmBalloon,this.theme);this.balloon.chart=this;(t!=this.previousWidth||r!=this.previousHeight)&&0<t&&0<r&&(e.style.width=t+"px",e.style.height=r+"px",a&&a.setSize(t,r));this.balloon.setBounds(2,2,t-2,r);this.realWidth=t;this.realHeight=r;this.divRealWidth=i;this.divRealHeight=s}},destroy:function(){this.chartDiv.innerHTML="";this.clearTimeOuts();this.interval&&clearInterval(this.interval);this.interval=NaN;this.legend&&this.legend.destroy()},clearTimeOuts:function(){var t=this.timeOuts;if(t){var e;for(e=0;e<t.length;e++)clearTimeout(t[e])}this.timeOuts=[]},clear:function(t){AmCharts.callMethod("clear",[this.chartScrollbar,this.scrollbarV,this.scrollbarH,this.chartCursor]);this.chartCursor=this.scrollbarH=this.scrollbarV=this.chartScrollbar=null;this.clearTimeOuts();this.interval&&clearInterval(this.interval);this.container&&(this.container.remove(this.chartDiv),this.container.remove(this.legendDiv));t||AmCharts.removeChart(this);if(t=this.div)for(;t.firstChild;)t.removeChild(t.firstChild);this.legend&&this.legend.destroy()},setMouseCursor:function(t){"auto"==t&&AmCharts.isNN&&(t="default");this.chartDiv.style.cursor=t;this.legendDiv.style.cursor=t},redrawLabels:function(){this.labels=[];var t=this.allLabels;this.createLabelsSet();var e;for(e=0;e<t.length;e++)this.drawLabel(t[e])},drawLabel:function(t){if(this.container&&!1!==t.enabled){t=AmCharts.processObject(t,AmCharts.Label,this.theme);var e=t.y,i=t.text,s=t.align,a=t.size,r=t.color,h=t.rotation,o=t.alpha,n=t.bold,l=AmCharts.toCoordinate(t.x,this.realWidth),e=AmCharts.toCoordinate(e,this.realHeight);l||(l=0);e||(e=0);void 0===r&&(r=this.color);isNaN(a)&&(a=this.fontSize);s||(s="start");"left"==s&&(s="start");"right"==s&&(s="end");"center"==s&&(s="middle",h?e=this.realHeight-e+e/2:l=this.realWidth/2-l);void 0===o&&(o=1);void 0===h&&(h=0);e+=a/2;i=AmCharts.text(this.container,i,r,this.fontFamily,a,s,n,o);i.translate(l,e);AmCharts.setCN(this,i,"label");t.id&&AmCharts.setCN(this,i,"label-"+t.id);0!==h&&i.rotate(h);t.url?(i.setAttr("cursor","pointer"),i.click(function(){AmCharts.getURL(t.url)})):i.node.style.pointerEvents="none";this.labelsSet.push(i);this.labels.push(i)}},addLabel:function(t,e,i,s,a,r,h,o,n,l){t={x:t,y:e,text:i,align:s,size:a,color:r,alpha:o,rotation:h,bold:n,url:l,enabled:!0};this.container&&this.drawLabel(t);this.allLabels.push(t)},clearLabels:function(){var t=this.labels,e;for(e=t.length-1;0<=e;e--)t[e].remove();this.labels=[];this.allLabels=[]},updateHeight:function(){var t=this.divRealHeight,e=this.legend;if(e){var i=this.legendDiv.offsetHeight,e=e.position;if("top"==e||"bottom"==e){t-=i;if(0>t||isNaN(t))t=0;this.chartDiv.style.height=t+"px"}}return t},updateWidth:function(){var t=this.divRealWidth,e=this.divRealHeight,i=this.legend;if(i){var s=this.legendDiv,a=s.offsetWidth;isNaN(i.width)||(a=i.width);var r=s.offsetHeight,s=s.style,h=this.chartDiv.style,i=i.position;if("right"==i||"left"==i){t-=a;if(0>t||isNaN(t))t=0;h.width=t+"px";"left"==i?(h.left=a+"px",s.left="0px"):(h.left="0px",s.left=t+"px");e>r&&(s.top=(e-r)/2+"px")}}return t},getTitleHeight:function(){var t=0,e=this.titles,i=!0;if(0<e.length){var t=15,s;for(s=0;s<e.length;s++){var a=e[s];!1!==a.enabled&&(i=!1,a=a.size,isNaN(a)&&(a=this.fontSize+2),t+=a+6)}i&&(t=0)}return t},addTitle:function(t,e,i,s,a){isNaN(e)&&(e=this.fontSize+2);t={text:t,size:e,color:i,alpha:s,bold:a,enabled:!0};this.titles.push(t);return t},handleWheel:function(t){var e=0;t||(t=window.event);t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3);e&&this.handleWheelReal(e,t.shiftKey);t.preventDefault&&t.preventDefault()},handleWheelReal:function(t){},addListeners:function(){var t=this,e=t.chartDiv;document.addEventListener?(t.panEventsEnabled&&(e.style.msTouchAction="none"),"ontouchstart"in document.documentElement&&(e.addEventListener("touchstart",function(e){t.handleTouchMove.call(t,e);t.handleTouchStart.call(t,e)},!0),e.addEventListener("touchmove",function(e){t.handleTouchMove.call(t,e)},!0),e.addEventListener("touchend",function(e){t.handleTouchEnd.call(t,e)},!0)),e.addEventListener("mousedown",function(e){t.mouseIsOver=!0;t.handleMouseMove.call(t,e);t.handleMouseDown.call(t,e)},!0),e.addEventListener("mouseover",function(e){t.handleMouseOver.call(t,e)},!0),e.addEventListener("mouseout",function(e){t.handleMouseOut.call(t,e)},!0)):(e.attachEvent("onmousedown",function(e){t.handleMouseDown.call(t,e)}),e.attachEvent("onmouseover",function(e){t.handleMouseOver.call(t,e)}),e.attachEvent("onmouseout",function(e){t.handleMouseOut.call(t,e)}))},dispDUpd:function(){if(!this.skipEvents){var t;this.dispatchDataUpdated&&(this.dispatchDataUpdated=!1,t="dataUpdated",this.fire(t,{type:t,chart:this}));this.chartCreated||(t="init",this.fire(t,{type:t,chart:this}));this.chartRendered||(t="rendered",this.fire(t,{type:t,chart:this}),this.chartRendered=!0);t="drawn";this.fire(t,{type:t,chart:this})}this.skipEvents=!1},validateSize:function(){var t=this;t.measure();var e=t.legend;if(t.realWidth!=t.previousWidth||t.realHeight!=t.previousHeight){if(0<t.realWidth&&0<t.realHeight){t.sizeChanged=!0;if(e){clearTimeout(t.legendInitTO);var i=setTimeout(function(){e.invalidateSize()},100);t.timeOuts.push(i);t.legendInitTO=i}"xy"!=t.type?t.marginsUpdated=!1:(t.marginsUpdated=!0,t.selfZoom=!0);clearTimeout(t.initTO);i=setTimeout(function(){t.initChart()},150);t.timeOuts.push(i);t.initTO=i}t.fire("resized",{type:"resized",chart:t})}t.renderFix();e&&e.renderFix()},invalidateSize:function(){this.previousHeight=this.previousWidth=NaN;this.invalidateSizeReal()},invalidateSizeReal:function(){var t=this;t.marginsUpdated=!1;clearTimeout(t.validateTO);var e=setTimeout(function(){t.validateSize()},5);t.timeOuts.push(e);t.validateTO=e},validateData:function(t){this.chartCreated&&(this.dataChanged=!0,this.marginsUpdated="xy"!=this.type?!1:!0,this.initChart(t))},validateNow:function(t,e){this.initTO&&clearTimeout(this.initTO);t&&(this.dataChanged=!0);this.skipEvents=e;this.chartRendered=!1;this.write(this.div)},showItem:function(t){t.hidden=!1;this.initChart()},hideItem:function(t){t.hidden=!0;this.initChart()},hideBalloon:function(){var t=this;clearInterval(t.hoverInt);clearTimeout(t.balloonTO);t.hoverInt=setTimeout(function(){t.hideBalloonReal.call(t)},t.hideBalloonTime)},cleanChart:function(){},hideBalloonReal:function(){var t=this.balloon;t&&t.hide()},showBalloon:function(t,e,i,s,a){var r=this;clearTimeout(r.balloonTO);clearInterval(r.hoverInt);r.balloonTO=setTimeout(function(){r.showBalloonReal.call(r,t,e,i,s,a)},1)},showBalloonReal:function(t,e,i,s,a){this.handleMouseMove();var r=this.balloon;r.enabled&&(r.followCursor(!1),r.changeColor(e),!i||r.fixedPosition?(r.setPosition(s,a),r.followCursor(!1)):r.followCursor(!0),t&&r.showBalloon(t))},handleTouchMove:function(t){this.hideBalloon();var e=this.chartDiv;t.touches&&(t=t.touches.item(0),this.mouseX=t.pageX-AmCharts.findPosX(e),this.mouseY=t.pageY-AmCharts.findPosY(e))},handleMouseOver:function(t){AmCharts.resetMouseOver();this.mouseIsOver=!0},handleMouseOut:function(t){AmCharts.resetMouseOver();this.mouseIsOver=!1},handleMouseMove:function(t){if(this.mouseIsOver){var e=this.chartDiv;t||(t=window.event);var i,s;if(t){this.posX=AmCharts.findPosX(e);this.posY=AmCharts.findPosY(e);switch(this.mouseMode){case 1:i=t.clientX-this.posX;s=t.clientY-this.posY;if(!this.divIsFixed){var e=document.body,a,r;e&&(a=e.scrollLeft,y1=e.scrollTop);if(e=document.documentElement)r=e.scrollLeft,y2=e.scrollTop;a=Math.max(a,r);r=Math.max(y1,y2);i+=a;s+=r}break;case 0:this.divIsFixed?(i=t.clientX-this.posX,s=t.clientY-this.posY):(i=t.pageX-this.posX,s=t.pageY-this.posY)}t.touches&&(t=t.touches.item(0),i=t.pageX-this.posX,s=t.pageY-this.posY);this.mouseX=i-this.dmouseX;this.mouseY=s-this.dmouseY}}},handleTouchStart:function(t){this.handleMouseDown(t)},handleTouchEnd:function(t){AmCharts.resetMouseOver();this.handleReleaseOutside(t)},handleReleaseOutside:function(t){},handleMouseDown:function(t){AmCharts.resetMouseOver();this.mouseIsOver=!0;t&&t.preventDefault&&(this.panEventsEnabled?t.preventDefault():t.touches||t.preventDefault())},addLegend:function(t,e){t=AmCharts.processObject(t,AmCharts.AmLegend,this.theme);t.divId=e;var i;i="object"!=typeof e&&e?document.getElementById(e):e;this.legend=t;t.chart=this;i?(t.div=i,t.position="outside",t.autoMargins=!1):t.div=this.legendDiv;i=this.handleLegendEvent;this.listenTo(t,"showItem",i);this.listenTo(t,"hideItem",i);this.listenTo(t,"clickMarker",i);this.listenTo(t,"rollOverItem",i);this.listenTo(t,"rollOutItem",i);this.listenTo(t,"rollOverMarker",i);this.listenTo(t,"rollOutMarker",i);this.listenTo(t,"clickLabel",i);return t},removeLegend:function(){this.legend=void 0;this.legendDiv.innerHTML=""},handleResize:function(){(AmCharts.isPercents(this.width)||AmCharts.isPercents(this.height))&&this.invalidateSizeReal();this.renderFix()},renderFix:function(){if(!AmCharts.VML){var t=this.container;t&&t.renderFix()}},getSVG:function(){if(AmCharts.hasSVG)return this.container},animate:function(t,e,i,s,a,r,h){t["an_"+e]&&AmCharts.removeFromArray(this.animations,t["an_"+e]);i={obj:t,frame:0,attribute:e,from:i,to:s,time:a,effect:r,suffix:h};t["an_"+e]=i;this.animations.push(i);return i},setLegendData:function(t){var e=this.legend;e&&e.setData(t)},startInterval:function(){var t=this;clearInterval(t.interval);t.interval=setInterval(function(){t.updateAnimations.call(t)},AmCharts.updateRate)},stopAnim:function(t){AmCharts.removeFromArray(this.animations,t)},updateAnimations:function(){var t;this.container&&this.container.update();for(t=this.animations.length-1;0<=t;t--){var e=this.animations[t],i=1e3*e.time/AmCharts.updateRate,s=e.frame+1,a=e.obj,r=e.attribute;if(s<=i){e.frame++;var h=Number(e.from),o=Number(e.to)-h,i=AmCharts[e.effect](0,s,h,o,i);0===o?(this.animations.splice(t,1),a.node.style[r]=Number(e.to)+e.suffix):a.node.style[r]=i+e.suffix}else a.node.style[r]=Number(e.to)+e.suffix,this.animations.splice(t,1)}},inIframe:function(){try{return window.self!==window.top}catch(t){return!0}},brr:function(){}});AmCharts.Slice=AmCharts.Class({construct:function(){}});AmCharts.SerialDataItem=AmCharts.Class({construct:function(){}});AmCharts.GraphDataItem=AmCharts.Class({construct:function(){}});AmCharts.Guide=AmCharts.Class({construct:function(t){this.cname="Guide";AmCharts.applyTheme(this,t,this.cname)}});AmCharts.Title=AmCharts.Class({construct:function(t){this.cname="Title";AmCharts.applyTheme(this,t,this.cname)}});AmCharts.Label=AmCharts.Class({construct:function(t){this.cname="Label";AmCharts.applyTheme(this,t,this.cname)}});AmCharts.AmGraph=AmCharts.Class({construct:function(t){this.cname="AmGraph";this.createEvents("rollOverGraphItem","rollOutGraphItem","clickGraphItem","doubleClickGraphItem","rightClickGraphItem","clickGraph","rollOverGraph","rollOutGraph");this.type="line";this.stackable=!0;this.columnCount=1;this.columnIndex=0;this.centerCustomBullets=this.showBalloon=!0;this.maxBulletSize=50;this.minBulletSize=4;this.balloonText="[[value]]";this.hidden=this.scrollbar=this.animationPlayed=!1;this.pointPosition="middle";this.depthCount=1;this.includeInMinMax=!0;this.negativeBase=0;this.visibleInLegend=!0;this.showAllValueLabels=!1;this.showBulletsAt=this.showBalloonAt="close";this.lineThickness=1;this.dashLength=0;this.connect=!0;this.lineAlpha=1;this.bullet="none";this.bulletBorderThickness=2;this.bulletBorderAlpha=0;this.bulletAlpha=1;this.bulletSize=8;this.cornerRadiusTop=this.hideBulletsCount=this.bulletOffset=0;this.cursorBulletAlpha=1;this.gradientOrientation="vertical";this.dy=this.dx=0;this.periodValue="";this.clustered=!0;this.periodSpan=1;this.y=this.x=0;this.switchable=!0;this.tcc=this.minDistance=1;this.labelRotation=0;this.labelAnchor="auto";this.labelOffset=3;this.bcn="graph-";AmCharts.applyTheme(this,t,this.cname)},draw:function(){var t=this.chart,e=t.type;isNaN(this.precision)||(this.numberFormatter?this.numberFormatter.precision=this.precision:this.numberFormatter={precision:this.precision,decimalSeparator:t.decimalSeparator,thousandsSeparator:t.thousandsSeparator});var i=t.container;this.container=i;this.destroy();var s=i.set(),a=i.set();this.behindColumns?(t.graphsBehindSet.push(s),t.bulletBehindSet.push(a)):(t.graphsSet.push(s),t.bulletSet.push(a));var r=this.bulletAxis;AmCharts.isString(r)&&(this.bulletAxis=t.getValueAxisById(r));this.bulletSet=a;if(!this.scrollbar){var r=t.marginLeftReal,h=t.marginTopReal;s.translate(r,h);a.translate(r,h)}i=i.set();AmCharts.remove(this.columnsSet);s.push(i);this.set=s;AmCharts.setCN(t,s,"graph-"+this.type);AmCharts.setCN(t,s,"graph-"+this.id);AmCharts.setCN(t,a,"graph-"+this.type);AmCharts.setCN(t,a,"graph-"+this.id);this.columnsSet=i;this.columnsArray=[];this.ownColumns=[];this.allBullets=[];this.animationArray=[];s=this.labelPosition;s||(a=this.valueAxis.stackType,s="top","column"==this.type&&(t.rotate&&(s="right"),"100%"==a||"regular"==a)&&(s="middle"),this.labelPosition=s);AmCharts.ifArray(this.data)&&(t=!1,"xy"==e?this.xAxis.axisCreated&&this.yAxis.axisCreated&&(t=!0):this.valueAxis.axisCreated&&(t=!0),!this.hidden&&t&&this.createGraph())},createGraph:function(){var t=this,e=t.chart;t.startAlpha=e.startAlpha;t.seqAn=e.sequencedAnimation;t.baseCoord=t.valueAxis.baseCoord;void 0===t.fillAlphas&&(t.fillAlphas=0);t.bulletColorR=t.bulletColor;void 0===t.bulletColorR&&(t.bulletColorR=t.lineColorR,t.bulletColorNegative=t.negativeLineColor);void 0===t.bulletAlpha&&(t.bulletAlpha=t.lineAlpha);clearTimeout(t.playedTO);if(!isNaN(t.valueAxis.min)&&!isNaN(t.valueAxis.max)){switch(e.type){case"serial":t.categoryAxis&&(t.createSerialGraph(),
"candlestick"==t.type&&1>t.valueAxis.minMaxMultiplier&&t.positiveClip(t.set));break;case"radar":t.createRadarGraph();break;case"xy":t.createXYGraph(),t.positiveClip(t.set)}t.playedTO=setTimeout(function(){t.setAnimationPlayed.call(t)},500*t.chart.startDuration)}},setAnimationPlayed:function(){this.animationPlayed=!0},createXYGraph:function(){var t=[],e=[],i=this.xAxis,s=this.yAxis;this.pmh=s.viH+1;this.pmw=i.viW+1;this.pmy=this.pmx=0;var a;for(a=this.start;a<=this.end;a++){var r=this.data[a].axes[i.id].graphs[this.id],h=r.values,o=h.x,n=h.y,h=i.getCoordinate(o),l=s.getCoordinate(n);!isNaN(o)&&!isNaN(n)&&(t.push(h),e.push(l),r.x=h,r.y=l,o=this.createBullet(r,h,l,a),n=this.labelText)&&(r=this.createLabel(r,h,l,n),this.positionLabel(h,l,r,o),this.allBullets.push(r))}this.drawLineGraph(t,e);this.launchAnimation()},createRadarGraph:function(){var t=this.valueAxis.stackType,e=[],i=[],s,a,r;for(r=this.start;r<=this.end;r++){var h=this.data[r].axes[this.valueAxis.id].graphs[this.id],o;o="none"==t||"3d"==t?h.values.value:h.values.close;if(isNaN(o))this.drawLineGraph(e,i),e=[],i=[];else{var n=this.y-(this.valueAxis.getCoordinate(o)-this.height),l=180-360/(this.end-this.start+1)*r;o=n*Math.sin(l/180*Math.PI);n*=Math.cos(l/180*Math.PI);e.push(o);i.push(n);var l=this.createBullet(h,o,n,r),d=this.labelText;d&&(h=this.createLabel(h,o,n,d),this.positionLabel(o,n,h,l),this.allBullets.push(h));isNaN(s)&&(s=o);isNaN(a)&&(a=n)}}e.push(s);i.push(a);this.drawLineGraph(e,i);this.launchAnimation()},positionLabel:function(t,e,i,s,a,r){a="middle";r=!1;var h=this.labelPosition,o=i.getBBox(),n=s.graphDataItem,l=this.chart.rotate,d=n.isNegative;e-=o.height/4/2;switch(h){case"top":h=l?"top":d?"bottom":"top";break;case"right":h=l?d?"left":"right":"right";break;case"bottom":h=l?"bottom":d?"top":"bottom";break;case"left":h=l?d?"right":"left":"left"}var c=n.columnGraphics,u=0,m=0;c&&(u=c.x,m=c.y);var p=this.labelOffset;switch(h){case"top":e-=s.size/2+o.height/2+p;break;case"right":a="start";t+=s.size/2+p;break;case"bottom":e+=s.size/2+o.height/2+p;break;case"left":a="end";t-=s.size/2+p;break;case"inside":"column"==this.type&&(r=!0,l?d?(a="end",t=u-3-p):(a="start",t=u+3+p):e=d?m+7+p:m-10-p);break;case"middle":"column"==this.type&&(r=!0,l?t-=(t-u)/2+p-3:e-=(e-m)/2+p-3)}"auto"!=this.labelAnchor&&(a=this.labelAnchor);i.attr({"text-anchor":a});this.labelRotation&&i.rotate(this.labelRotation);i.translate(t,e);o=i.getBBox();!this.showAllValueLabels&&c&&r&&(o.height>n.columnHeight||o.width>n.columnWidth)&&(i.remove(),i=!1);if(i&&"serial"==this.chart.type)if(l){if(0>e||e>this.height)i.remove(),i=!1}else if(0>t||t>this.width)i.remove(),i=!1;return i},getGradRotation:function(){var t=270;"horizontal"==this.gradientOrientation&&(t=0);return this.gradientRotation=t},createSerialGraph:function(){this.dashLengthSwitched=this.fillColorsSwitched=this.lineColorSwitched=void 0;var t=this.chart,e=this.id,i=this.index,s=this.data,a=this.chart.container,r=this.valueAxis,h=this.type,o=this.columnWidthReal,n=this.showBulletsAt;isNaN(this.columnWidth)||(o=this.columnWidth);isNaN(o)&&(o=.8);var l=this.useNegativeColorIfDown,d=this.width,c=this.height,u=this.y,m=this.rotate,p=this.columnCount,f=AmCharts.toCoordinate(this.cornerRadiusTop,o/2),g=this.connect,v=[],C=[],A,b,x,N,y=this.chart.graphs.length,w,M=this.dx/this.tcc,S=this.dy/this.tcc,T=r.stackType,D=this.start,B=this.end,L=this.scrollbar,k="graph-column-";L&&(k="scrollbar-graph-column-");var O=this.categoryAxis,R=this.baseCoord,I=this.negativeBase,F=this.columnIndex,z=this.lineThickness,E=this.lineAlpha,G=this.lineColorR,P=this.dashLength,W=this.set,V,H=this.getGradRotation(),Y=this.chart.columnSpacing,X=O.cellWidth,U=(X*o-p)/p;Y>U&&(Y=U);var j,Z,q,_=c+1,K=d+1,Q=0,J=0,$,tt,et,it,st=this.fillColorsR,at=this.negativeFillColors,rt=this.negativeLineColor,ht=this.fillAlphas,ot=this.negativeFillAlphas;"object"==typeof ht&&(ht=ht[0]);"object"==typeof ot&&(ot=ot[0]);var nt=r.getCoordinate(r.min);r.logarithmic&&(nt=r.getCoordinate(r.minReal));this.minCoord=nt;this.resetBullet&&(this.bullet="none");if(!(L||"line"!=h&&"smoothedLine"!=h&&"step"!=h||(1==s.length&&"step"!=h&&"none"==this.bullet&&(this.bullet="round",this.resetBullet=!0),!at&&void 0==rt||l))){var lt=I;lt>r.max&&(lt=r.max);lt<r.min&&(lt=r.min);r.logarithmic&&(lt=r.minReal);var dt=r.getCoordinate(lt),ct=r.getCoordinate(r.max);m?(_=c,K=Math.abs(ct-dt)+1,$=c,tt=Math.abs(nt-dt)+1,it=J=0,r.reversed?(Q=0,et=dt):(Q=dt,et=0)):(K=d,_=Math.abs(ct-dt)+1,tt=d,$=Math.abs(nt-dt)+1,et=Q=0,r.reversed?(it=u,J=dt):it=dt+1)}var ut=Math.round;this.pmx=ut(Q);this.pmy=ut(J);this.pmh=ut(_);this.pmw=ut(K);this.nmx=ut(et);this.nmy=ut(it);this.nmh=ut($);this.nmw=ut(tt);AmCharts.isModern||(this.nmy=this.nmx=0,this.nmh=this.height);this.clustered||(p=1);o="column"==h?(X*o-Y*(p-1))/p:X*o;1>o&&(o=1);var mt=this.fixedColumnWidth;isNaN(mt)||(o=mt);var pt;if("line"==h||"step"==h||"smoothedLine"==h){if(0<D){for(pt=D-1;-1<pt;pt--)if(j=s[pt],Z=j.axes[r.id].graphs[e],q=Z.values.value,!isNaN(q)){D=pt;break}if(this.lineColorField)for(pt=D;-1<pt;pt--)if(j=s[pt],Z=j.axes[r.id].graphs[e],Z.lineColor){this.bulletColorSwitched=this.lineColorSwitched=Z.lineColor;break}if(this.fillColorsField)for(pt=D;-1<pt;pt--)if(j=s[pt],Z=j.axes[r.id].graphs[e],Z.fillColors){this.fillColorsSwitched=Z.fillColors;break}if(this.dashLengthField)for(pt=D;-1<pt;pt--)if(j=s[pt],Z=j.axes[r.id].graphs[e],!isNaN(Z.dashLength)){this.dashLengthSwitched=Z.dashLength;break}}if(B<s.length-1)for(pt=B+1;pt<s.length;pt++)if(j=s[pt],Z=j.axes[r.id].graphs[e],q=Z.values.value,!isNaN(q)){B=pt;break}}B<s.length-1&&B++;var ft=[],gt=[],vt=!1;if("line"==h||"step"==h||"smoothedLine"==h)if(this.stackable&&"regular"==T||"100%"==T||this.fillToGraph)vt=!0;var Ct=this.noStepRisers,At=-1e3,bt=-1e3,xt=this.minDistance,Nt=!0,yt=!1;for(pt=D;pt<=B;pt++){j=s[pt];Z=j.axes[r.id].graphs[e];Z.index=pt;var wt,Mt=NaN;if(l&&void 0==this.openField)for(var St=pt+1;St<s.length&&(!s[St]||!(wt=s[pt+1].axes[r.id].graphs[e])||!wt.values||(Mt=wt.values.value,isNaN(Mt)));St++);var Tt,Dt,Bt,Lt,kt=NaN,Ot=NaN,Rt=NaN,It=NaN,Ft=NaN,zt=NaN,Et=NaN,Gt=NaN,Pt=NaN,Wt=NaN,Vt=NaN,Ht=NaN,Yt=NaN,Xt=NaN,Ut=NaN,jt=NaN,Zt=NaN,qt=void 0,_t=st,Kt=ht,Qt=G,Jt,$t,te=this.proCandlesticks,ee=this.topRadius,ie=this.pattern;void 0!=Z.pattern&&(ie=Z.pattern);isNaN(Z.alpha)||(Kt=Z.alpha);isNaN(Z.dashLength)||(P=Z.dashLength);var se=Z.values;r.recalculateToPercents&&(se=Z.percents);if(se){Xt=this.stackable&&"none"!=T&&"3d"!=T?se.close:se.value;if("candlestick"==h||"ohlc"==h)Xt=se.close,jt=se.low,Et=r.getCoordinate(jt),Ut=se.high,Pt=r.getCoordinate(Ut);Zt=se.open;Rt=r.getCoordinate(Xt);isNaN(Zt)||(Ft=r.getCoordinate(Zt),l&&(Mt=Zt,Zt=Ft=NaN));l&&(void 0==this.openField?wt&&(wt.isNegative=Mt<Xt?!0:!1,isNaN(Mt)&&(Z.isNegative=!Nt)):Z.isNegative=Mt>Xt?!0:!1);if(!L)switch(this.showBalloonAt){case"close":Z.y=Rt;break;case"open":Z.y=Ft;break;case"high":Z.y=Pt;break;case"low":Z.y=Et}var kt=j.x[O.id],ae=this.periodSpan-1,re=Math.floor(X/2)+Math.floor(ae*X/2),he=re,oe=0;"left"==this.stepDirection&&(oe=(2*X+ae*X)/2,kt-=oe);"center"==this.stepDirection&&(oe=X/2,kt-=oe);"start"==this.pointPosition&&(kt-=X/2+Math.floor(ae*X/2),re=0,he=Math.floor(X)+Math.floor(ae*X));"end"==this.pointPosition&&(kt+=X/2+Math.floor(ae*X/2),re=Math.floor(X)+Math.floor(ae*X),he=0);if(Ct){var ne=this.columnWidth;isNaN(ne)||(re*=ne,he*=ne)}L||(Z.x=kt);-1e5>kt&&(kt=-1e5);kt>d+1e5&&(kt=d+1e5);m?(Ot=Rt,It=Ft,Ft=Rt=kt,isNaN(Zt)&&!this.fillToGraph&&(It=R),zt=Et,Gt=Pt):(It=Ot=kt,isNaN(Zt)&&!this.fillToGraph&&(Ft=R));if(!te&&Xt<Zt||te&&Xt<V)Z.isNegative=!0,at&&(_t=at),ot&&(Kt=ot),void 0!=rt&&(Qt=rt);yt=!1;isNaN(Xt)||(l?Xt>Mt?(Nt&&(yt=!0),Nt=!1):(Nt||(yt=!0),Nt=!0):Z.isNegative=Xt<I?!0:!1,V=Xt);void 0!=Z.color&&(_t=Z.color);Z.fillColors&&(_t=Z.fillColors);isNaN(Z.alpha)||(Kt=Z.alpha);switch(h){case"line":if(isNaN(Xt))g||(this.drawLineGraph(v,C,ft,gt),v=[],C=[],ft=[],gt=[]);else{if(Math.abs(Ot-At)>=xt||Math.abs(Rt-bt)>=xt)v.push(Ot),C.push(Rt),At=Ot,bt=Rt;Wt=Ot;Vt=Rt;Ht=Ot;Yt=Rt;!vt||isNaN(Ft)||isNaN(It)||(ft.push(It),gt.push(Ft));if(yt||void 0!=Z.lineColor||void 0!=Z.fillColors||!isNaN(Z.dashLength))this.drawLineGraph(v,C,ft,gt),v=[Ot],C=[Rt],ft=[],gt=[],!vt||isNaN(Ft)||isNaN(It)||(ft.push(It),gt.push(Ft)),l?Nt?(this.lineColorSwitched=G,this.fillColorsSwitched=st):(this.lineColorSwitched=rt,this.fillColorsSwitched=at):(this.lineColorSwitched=Z.lineColor,this.fillColorsSwitched=Z.fillColors),this.dashLengthSwitched=Z.dashLength;Z.gap&&(this.drawLineGraph(v,C,ft,gt),v=[],C=[],ft=[],gt=[])}break;case"smoothedLine":if(isNaN(Xt))g||(this.drawSmoothedGraph(v,C,ft,gt),v=[],C=[],ft=[],gt=[]);else{if(Math.abs(Ot-At)>=xt||Math.abs(Rt-bt)>=xt)v.push(Ot),C.push(Rt),At=Ot,bt=Rt;Wt=Ot;Vt=Rt;Ht=Ot;Yt=Rt;!vt||isNaN(Ft)||isNaN(It)||(ft.push(It),gt.push(Ft));void 0==Z.lineColor&&void 0==Z.fillColors&&isNaN(Z.dashLength)||(this.drawSmoothedGraph(v,C,ft,gt),v=[Ot],C=[Rt],ft=[],gt=[],!vt||isNaN(Ft)||isNaN(It)||(ft.push(It),gt.push(Ft)),this.lineColorSwitched=Z.lineColor,this.fillColorsSwitched=Z.fillColors,this.dashLengthSwitched=Z.dashLength);Z.gap&&(this.drawSmoothedGraph(v,C,ft,gt),v=[],C=[],ft=[],gt=[])}break;case"step":if(!isNaN(Xt)){m?(isNaN(A)||(v.push(A),C.push(Rt-re)),C.push(Rt-re),v.push(Ot),C.push(Rt+he),v.push(Ot),!vt||isNaN(Ft)||isNaN(It)||(isNaN(x)||(ft.push(x),gt.push(Ft-re)),ft.push(It),gt.push(Ft-re),ft.push(It),gt.push(Ft+he))):(isNaN(b)||(C.push(b),v.push(A),C.push(b),v.push(Ot-re)),v.push(Ot-re),C.push(Rt),v.push(Ot+he),C.push(Rt),!vt||isNaN(Ft)||isNaN(It)||(isNaN(N)||(ft.push(It-re),gt.push(N)),ft.push(It-re),gt.push(Ft),ft.push(It+he),gt.push(Ft)));A=Ot;b=Rt;x=It;N=Ft;Wt=Ot;Vt=Rt;Ht=Ot;Yt=Rt;if(yt||void 0!=Z.lineColor||void 0!=Z.fillColors||!isNaN(Z.dashLength)){var le=v[v.length-2],de=C[C.length-2];v.pop();C.pop();this.drawLineGraph(v,C,ft,gt);v=[le];C=[de];ft=[];gt=[];this.lineColorSwitched=Z.lineColor;this.fillColorsSwitched=Z.fillColors;this.dashLengthSwitched=Z.dashLength;l&&(Nt?(this.lineColorSwitched=G,this.fillColorsSwitched=st):(this.lineColorSwitched=rt,this.fillColorsSwitched=at))}if(Ct||Z.gap)A=b=NaN,this.drawLineGraph(v,C,ft,gt),v=[],C=[],ft=[],gt=[]}else if(!g){if(1>=this.periodSpan||1<this.periodSpan&&Ot-A>re+he)A=b=NaN;this.drawLineGraph(v,C,ft,gt);v=[];C=[];ft=[];gt=[]}break;case"column":Jt=Qt;void 0!=Z.lineColor&&(Jt=Z.lineColor);if(!isNaN(Xt)){l||(Z.isNegative=Xt<I?!0:!1);Z.isNegative&&(at&&(_t=at),void 0!=rt&&(Jt=rt));var ce=r.min,ue=r.max;if(!(Xt<ce&&Zt<ce||Xt>ue&&Zt>ue)){var me;if(m){"3d"==T?(Dt=Rt-(p/2-this.depthCount+1)*(o+Y)+Y/2+S*F,Tt=It+M*F,me=F):(Dt=Math.floor(Rt-(p/2-F)*(o+Y)+Y/2),Tt=It,me=0);Bt=o;Wt=Ot;Vt=Dt+o/2;isNaN(It)||It>Ot&&!Z.isNegative&&(Wt=It);Ht=Ot;Yt=Dt+o/2;Dt+Bt>c+me*S&&(Bt=c-Dt+me*S);Dt<me*S&&(Bt+=Dt,Dt=me*S);Lt=Ot-It;var pe=Tt;Tt=AmCharts.fitToBounds(Tt,0,d);Lt+=pe-Tt;Lt=AmCharts.fitToBounds(Lt,-Tt,d-Tt+M*F);Dt<c&&0<Bt&&(qt=new AmCharts.Cuboid(a,Lt,Bt,M-t.d3x,S-t.d3y,_t,Kt,z,Jt,E,H,f,m,P,ie,ee,k),Z.columnWidth=Math.abs(Lt),Z.columnHeight=Math.abs(Bt))}else{"3d"==T?(Tt=Ot-(p/2-this.depthCount+1)*(o+Y)+Y/2+M*F,Dt=Ft+S*F,me=F):(Tt=Ot-(p/2-F)*(o+Y)+Y/2,Dt=Ft,me=0);Bt=o;Wt=Tt+o/2;Vt=Rt;isNaN(Ft)||Ft<Rt&&!Z.isNegative&&(Vt=Ft);Ht=Tt+o/2;Yt=Rt;Tt+Bt>d+me*M&&(Bt=d-Tt+me*M);Tt<me*M&&(Bt+=Tt-me*M,Tt=me*M);Lt=Rt-Ft;var fe=Dt;Dt=AmCharts.fitToBounds(Dt,this.dy,c);Lt+=fe-Dt;Lt=AmCharts.fitToBounds(Lt,-Dt+S*F,c-Dt);Tt<d+F*M&&0<Bt&&(this.showOnAxis&&(Dt-=S/2),qt=new AmCharts.Cuboid(a,Bt,Lt,M-t.d3x,S-t.d3y,_t,Kt,z,Jt,this.lineAlpha,H,f,m,P,ie,ee,k),Z.columnHeight=Math.abs(Lt),Z.columnWidth=Math.abs(Bt))}}if(qt&&($t=qt.set,AmCharts.setCN(t,qt.set,"graph-"+this.type),AmCharts.setCN(t,qt.set,"graph-"+this.id),Z.className&&AmCharts.setCN(t,qt.set,Z.className,!0),Z.columnGraphics=$t,$t.translate(Tt,Dt),this.columnsSet.push($t),(Z.url||this.showHandOnHover)&&$t.setAttr("cursor","pointer"),!L)){"none"==T&&(w=m?(this.end+1-pt)*y-i:y*pt+i);"3d"==T&&(m?(w=(this.end+1-pt)*y-i-1e3*this.depthCount,Wt+=M*this.columnIndex,Ht+=M*this.columnIndex,Z.y+=M*this.columnIndex):(w=(y-i)*(pt+1)+1e3*this.depthCount,Vt+=S*this.columnIndex,Yt+=S*this.columnIndex,Z.y+=S*this.columnIndex));if("regular"==T||"100%"==T)w=m?0<se.value?(this.end+1-pt)*y+i:(this.end+1-pt)*y-i:0<se.value?y*pt+i:y*pt-i;this.columnsArray.push({column:qt,depth:w});Z.x=m?Dt+Bt/2:Tt+Bt/2;this.ownColumns.push(qt);this.animateColumns(qt,pt,Ot,It,Rt,Ft);this.addListeners($t,Z)}}break;case"candlestick":if(!isNaN(Zt)&&!isNaN(Xt)){var ge,ve;Jt=Qt;void 0!=Z.lineColor&&(Jt=Z.lineColor);if(m){if(Dt=Rt-o/2,Tt=It,Bt=o,Dt+Bt>c&&(Bt=c-Dt),0>Dt&&(Bt+=Dt,Dt=0),Dt<c&&0<Bt){var Ce,Ae;Xt>Zt?(Ce=[Ot,Gt],Ae=[It,zt]):(Ce=[It,Gt],Ae=[Ot,zt]);!isNaN(Gt)&&!isNaN(zt)&&Rt<c&&0<Rt&&(ge=AmCharts.line(a,Ce,[Rt,Rt],Jt,E,z),ve=AmCharts.line(a,Ae,[Rt,Rt],Jt,E,z));Lt=Ot-It;qt=new AmCharts.Cuboid(a,Lt,Bt,M,S,_t,ht,z,Jt,E,H,f,m,P,ie,ee,k)}}else if(Tt=Ot-o/2,Dt=Ft+z/2,Bt=o,Tt+Bt>d&&(Bt=d-Tt),0>Tt&&(Bt+=Tt,Tt=0),Lt=Rt-Ft,Tt<d&&0<Bt){te&&Xt>=Zt&&(Kt=0);var qt=new AmCharts.Cuboid(a,Bt,Lt,M,S,_t,Kt,z,Jt,E,H,f,m,P,ie,ee,k),be,xe;Xt>Zt?(be=[Rt,Pt],xe=[Ft,Et]):(be=[Ft,Pt],xe=[Rt,Et]);!isNaN(Pt)&&!isNaN(Et)&&Ot<d&&0<Ot&&(ge=AmCharts.line(a,[Ot,Ot],be,Jt,E,z),ve=AmCharts.line(a,[Ot,Ot],xe,Jt,E,z),AmCharts.setCN(t,ge,this.bcn+"line-high"),Z.className&&AmCharts.setCN(t,ge,Z.className,!0),AmCharts.setCN(t,ve,this.bcn+"line-low"),Z.className&&AmCharts.setCN(t,ve,Z.className,!0))}qt&&($t=qt.set,Z.columnGraphics=$t,W.push($t),$t.translate(Tt,Dt-z/2),(Z.url||this.showHandOnHover)&&$t.setAttr("cursor","pointer"),ge&&(W.push(ge),W.push(ve)),Wt=Ot,Vt=Rt,m?(Yt=Rt,Ht=Ot,"open"==n&&(Ht=It),"high"==n&&(Ht=Gt),"low"==n&&(Ht=zt)):(Yt=Rt,"open"==n&&(Yt=Ft),"high"==n&&(Yt=Pt),"low"==n&&(Yt=Et),Ht=Ot),L||(Z.x=m?Dt+Bt/2:Tt+Bt/2,this.animateColumns(qt,pt,Ot,It,Rt,Ft),this.addListeners($t,Z)))}break;case"ohlc":if(!(isNaN(Zt)||isNaN(Ut)||isNaN(jt)||isNaN(Xt))){var Ne=a.set();W.push(Ne);Xt<Zt&&(Z.isNegative=!0,void 0!=rt&&(Qt=rt));var ye,we,Me;if(m){var Se=Rt-o/2,Se=AmCharts.fitToBounds(Se,0,c),Te=AmCharts.fitToBounds(Rt,0,c),De=Rt+o/2,De=AmCharts.fitToBounds(De,0,c);we=AmCharts.line(a,[It,It],[Se,Te],Qt,E,z,P);0<Rt&&Rt<c&&(ye=AmCharts.line(a,[zt,Gt],[Rt,Rt],Qt,E,z,P));Me=AmCharts.line(a,[Ot,Ot],[Te,De],Qt,E,z,P);Yt=Rt;Ht=Ot;"open"==n&&(Ht=It);"high"==n&&(Ht=Gt);"low"==n&&(Ht=zt)}else{var Be=Ot-o/2,Be=AmCharts.fitToBounds(Be,0,d),Le=AmCharts.fitToBounds(Ot,0,d),ke=Ot+o/2,ke=AmCharts.fitToBounds(ke,0,d);we=AmCharts.line(a,[Be,Le],[Ft,Ft],Qt,E,z,P);0<Ot&&Ot<d&&(ye=AmCharts.line(a,[Ot,Ot],[Et,Pt],Qt,E,z,P));Me=AmCharts.line(a,[Le,ke],[Rt,Rt],Qt,E,z,P);Yt=Rt;"open"==n&&(Yt=Ft);"high"==n&&(Yt=Pt);"low"==n&&(Yt=Et);Ht=Ot}W.push(we);W.push(ye);W.push(Me);AmCharts.setCN(t,we,this.bcn+"stroke-open");AmCharts.setCN(t,Me,this.bcn+"stroke-close");AmCharts.setCN(t,ye,this.bcn+"stroke");Z.className&&AmCharts.setCN(t,Ne,Z.className,!0);Wt=Ot;Vt=Rt}}if(!L&&!isNaN(Xt)){var Oe=this.hideBulletsCount;if(this.end-this.start<=Oe||0===Oe){var Re=this.createBullet(Z,Ht,Yt,pt),Ie=this.labelText;if(Ie&&Re){var Fe=this.createLabel(Z,Ht,Yt,Ie);(Fe=this.positionLabel(Wt,Vt,Fe,Re,Bt,Lt))&&this.allBullets.push(Fe)}if("regular"==T||"100%"==T){var ze=r.totalText;if(ze){var Ee=this.createLabel(Z,0,0,ze,r.totalTextColor);this.allBullets.push(Ee);var Ge=Ee.getBBox(),Pe=Ge.width,We=Ge.height,Ve,He,Ye=r.totalTextOffset,Xe=r.totals[pt];Xe&&Xe.remove();var Ue=0;"column"!=h&&(Ue=this.bulletSize);m?(He=Rt,Ve=0>Xt?Ot-Pe/2-2-Ue-Ye:Ot+Pe/2+3+Ue+Ye):(Ve=Ot,He=0>Xt?Rt+We/2+Ue+Ye:Rt-We/2-3-Ue-Ye);Ee.translate(Ve,He);r.totals[pt]=Ee;m?(0>He||He>c)&&Ee.remove():(0>Ve||Ve>d)&&Ee.remove()}}}}}}if("line"==h||"step"==h||"smoothedLine"==h)"smoothedLine"==h?this.drawSmoothedGraph(v,C,ft,gt):this.drawLineGraph(v,C,ft,gt),L||this.launchAnimation();this.bulletsHidden&&this.hideBullets();this.customBulletsHidden&&this.hideCustomBullets()},animateColumns:function(t,e,i,s,a,r){var h=this;i=h.chart.startDuration;0<i&&!h.animationPlayed&&(h.seqAn?(t.set.hide(),h.animationArray.push(t),t=setTimeout(function(){h.animate.call(h)},i/(h.end-h.start+1)*(e-h.start)*1e3),h.timeOuts.push(t)):h.animate(t))},createLabel:function(t,e,i,s,a){var r=this.chart,h=t.labelColor;h||(h=this.color);h||(h=r.color);a&&(h=a);a=this.fontSize;void 0===a&&(this.fontSize=a=r.fontSize);var o=this.labelFunction;s=r.formatString(s,t);s=AmCharts.cleanFromEmpty(s);o&&(s=o(t,s));t=AmCharts.text(this.container,s,h,r.fontFamily,a);t.node.style.pointerEvents="none";t.translate(e,i);this.bulletSet.push(t);return t},positiveClip:function(t){t.clipRect(this.pmx,this.pmy,this.pmw,this.pmh)},negativeClip:function(t){t.clipRect(this.nmx,this.nmy,this.nmw,this.nmh)},drawLineGraph:function(t,e,i,s){var a=this;if(1<t.length){var r=a.set,h=a.chart,o=a.container,n=o.set(),l=o.set();r.push(l);r.push(n);var d=a.lineAlpha,c=a.lineThickness,r=a.fillAlphas,u=a.lineColorR,m=a.negativeLineAlpha;isNaN(m)&&(m=d);var p=a.lineColorSwitched;p&&(u=p);var p=a.fillColorsR,f=a.fillColorsSwitched;f&&(p=f);var g=a.dashLength;(f=a.dashLengthSwitched)&&(g=f);var f=a.negativeLineColor,v=a.negativeFillColors,C=a.negativeFillAlphas,A=a.baseCoord;0!==a.negativeBase&&(A=a.valueAxis.getCoordinate(a.negativeBase));d=AmCharts.line(o,t,e,u,d,c,g,!1,!0);AmCharts.setCN(h,d,a.bcn+"stroke");n.push(d);n.click(function(t){a.handleGraphEvent(t,"clickGraph")}).mouseover(function(t){a.handleGraphEvent(t,"rollOverGraph")}).mouseout(function(t){a.handleGraphEvent(t,"rollOutGraph")});void 0===f||a.useNegativeColorIfDown||(c=AmCharts.line(o,t,e,f,m,c,g,!1,!0),AmCharts.setCN(h,c,a.bcn+"stroke"),AmCharts.setCN(h,c,a.bcn+"stroke-negative"),l.push(c));if(0<r||0<C)if(c=t.join(";").split(";"),m=e.join(";").split(";"),d=h.type,"serial"==d?0<i.length?(i.reverse(),s.reverse(),c=t.concat(i),m=e.concat(s)):a.rotate?(m.push(m[m.length-1]),c.push(A),m.push(m[0]),c.push(A),m.push(m[0]),c.push(c[0])):(c.push(c[c.length-1]),m.push(A),c.push(c[0]),m.push(A),c.push(t[0]),m.push(m[0])):"xy"==d&&(e=a.fillToAxis)&&(AmCharts.isString(e)&&(e=h.getValueAxisById(e)),"H"==e.orientation?(A="top"==e.position?0:e.viH,c.push(c[c.length-1]),m.push(A),c.push(c[0]),m.push(A),c.push(t[0]),m.push(m[0])):(A="left"==e.position?0:e.viW,m.push(m[m.length-1]),c.push(A),m.push(m[0]),c.push(A),m.push(m[0]),c.push(c[0]))),t=a.gradientRotation,0<r&&(e=AmCharts.polygon(o,c,m,p,r,1,"#000",0,t),e.pattern(a.pattern),AmCharts.setCN(h,e,a.bcn+"fill"),n.push(e)),v||void 0!==f)isNaN(C)&&(C=r),v||(v=f),o=AmCharts.polygon(o,c,m,v,C,1,"#000",0,t),AmCharts.setCN(h,o,a.bcn+"fill"),AmCharts.setCN(h,o,a.bcn+"fill-negative"),o.pattern(a.pattern),l.push(o),l.click(function(t){a.handleGraphEvent(t,"clickGraph")}).mouseover(function(t){a.handleGraphEvent(t,"rollOverGraph")}).mouseout(function(t){a.handleGraphEvent(t,"rollOutGraph")});a.applyMask(l,n)}},applyMask:function(t,e){var i=t.length();"serial"!=this.chart.type||this.scrollbar||(this.positiveClip(e),0<i&&this.negativeClip(t))},drawSmoothedGraph:function(t,e,i,s){if(1<t.length){var a=this.set,r=this.chart,h=this.container,o=h.set(),n=h.set();a.push(n);a.push(o);var l=this.lineAlpha,d=this.lineThickness,a=this.dashLength,c=this.fillAlphas,u=this.lineColorR,m=this.fillColorsR,p=this.negativeLineColor,f=this.negativeFillColors,g=this.negativeFillAlphas,v=this.baseCoord,C=this.lineColorSwitched;C&&(u=C);(C=this.fillColorsSwitched)&&(m=C);C=this.negativeLineAlpha;isNaN(C)&&(C=l);l=new AmCharts.Bezier(h,t,e,u,l,d,m,0,a);AmCharts.setCN(r,l,this.bcn+"stroke");o.push(l.path);void 0!==p&&(d=new AmCharts.Bezier(h,t,e,p,C,d,m,0,a),AmCharts.setCN(r,d,this.bcn+"stroke"),AmCharts.setCN(r,d,this.bcn+"stroke-negative"),n.push(d.path));0<c&&(l=t.join(";").split(";"),u=e.join(";").split(";"),d="",0<i.length?(i.push("M"),s.push("M"),i.reverse(),s.reverse(),l=t.concat(i),u=e.concat(s)):(this.rotate?(d+=" L"+v+","+e[e.length-1],d+=" L"+v+","+e[0]):(d+=" L"+t[t.length-1]+","+v,d+=" L"+t[0]+","+v),d+=" L"+t[0]+","+e[0]),i=new AmCharts.Bezier(h,l,u,NaN,0,0,m,c,a,d),AmCharts.setCN(r,i,this.bcn+"fill"),i.path.pattern(this.pattern),o.push(i.path),f||void 0!==p)&&(g||(g=c),f||(f=p),t=new AmCharts.Bezier(h,t,e,NaN,0,0,f,g,a,d),t.path.pattern(this.pattern),AmCharts.setCN(r,t,this.bcn+"fill"),AmCharts.setCN(r,t,this.bcn+"fill-negative"),n.push(t.path));this.applyMask(n,o)}},launchAnimation:function(){var t=this,e=t.chart.startDuration;if(0<e&&!t.animationPlayed){var i=t.set,s=t.bulletSet;AmCharts.VML||(i.attr({opacity:t.startAlpha}),s.attr({opacity:t.startAlpha}));i.hide();s.hide();t.seqAn?(e=setTimeout(function(){t.animateGraphs.call(t)},t.index*e*1e3),t.timeOuts.push(e)):t.animateGraphs()}},animateGraphs:function(){var t=this.chart,e=this.set,i=this.bulletSet,s=this.x,a=this.y;e.show();i.show();var r=t.startDuration,t=t.startEffect;e&&(this.rotate?(e.translate(-1e3,a),i.translate(-1e3,a)):(e.translate(s,-1e3),i.translate(s,-1e3)),e.animate({opacity:1,translate:s+","+a},r,t),i.animate({opacity:1,translate:s+","+a},r,t))},animate:function(t){var e=this.chart,i=this.animationArray;!t&&0<i.length&&(t=i[0],i.shift());i=AmCharts[AmCharts.getEffect(e.startEffect)];e=e.startDuration;t&&(this.rotate?t.animateWidth(e,i):t.animateHeight(e,i),t.set.show())},legendKeyColor:function(){var t=this.legendColor,e=this.lineAlpha;void 0===t&&(t=this.lineColorR,0===e&&(e=this.fillColorsR)&&(t="object"==typeof e?e[0]:e));return t},legendKeyAlpha:function(){var t=this.legendAlpha;void 0===t&&(t=this.lineAlpha,this.fillAlphas>t&&(t=this.fillAlphas),0===t&&(t=this.bulletAlpha),0===t&&(t=1));return t},createBullet:function(t,e,i,s){if(!isNaN(e)&&!isNaN(i)){s=this.chart;var a=this.container,r=this.bulletOffset,h=this.bulletSize;isNaN(t.bulletSize)||(h=t.bulletSize);var o=t.values.value,n=this.maxValue,l=this.minValue,d=this.maxBulletSize,c=this.minBulletSize;isNaN(n)||(isNaN(o)||(h=(o-l)/(n-l)*(d-c)+c),l==n&&(h=d));n=h;this.bulletAxis&&(h=t.values.error,isNaN(h)||(o=h),h=this.bulletAxis.stepWidth*o);h<this.minBulletSize&&(h=this.minBulletSize);this.rotate?e=t.isNegative?e-r:e+r:i=t.isNegative?i+r:i-r;var u,c=this.bulletColorR;t.lineColor&&(this.bulletColorSwitched=t.lineColor);this.bulletColorSwitched&&(c=this.bulletColorSwitched);t.isNegative&&void 0!==this.bulletColorNegative&&(c=this.bulletColorNegative);void 0!==t.color&&(c=t.color);var m;"xy"==s.type&&this.valueField&&(m=this.pattern,t.pattern&&(m=t.pattern));r=this.bullet;t.bullet&&(r=t.bullet);var o=this.bulletBorderThickness,l=this.bulletBorderColorR,d=this.bulletBorderAlpha,p=this.bulletAlpha;l||(l=c);this.useLineColorForBulletBorder&&(l=this.lineColorR);var f=t.alpha;isNaN(f)||(p=f);if("none"!=this.bullet||t.bullet)u=AmCharts.bullet(a,r,h,c,p,o,l,d,n,0,m);if(this.customBullet||t.customBullet)m=this.customBullet,t.customBullet&&(m=t.customBullet),m&&(u&&u.remove(),"function"==typeof m?(u=new m,u.chart=s,t.bulletConfig&&(u.availableSpace=i,u.graph=this,u.graphDataItem=t,u.bulletY=i,t.bulletConfig.minCoord=this.minCoord-i,u.bulletConfig=t.bulletConfig),u.write(a),u=u.set):(s.path&&(m=s.path+m),u=a.set(),a=a.image(m,0,0,h,h),u.push(a),this.centerCustomBullets&&a.translate(-h/2,-h/2)));u&&((t.url||this.showHandOnHover)&&u.setAttr("cursor","pointer"),"serial"==s.type&&(-.5>e-0||e-0>this.width||i<-h/2||i-0>this.height)&&(u.remove(),u=null),u&&(this.bulletSet.push(u),u.translate(e,i),this.addListeners(u,t),this.allBullets.push(u)),t.bx=e,t.by=i,AmCharts.setCN(s,u,this.bcn+"bullet"),t.className&&AmCharts.setCN(s,u,t.className,!0));u?(u.size=h||0,t.bulletGraphics=u):u={size:0};u.graphDataItem=t;return u}},showBullets:function(){var t=this.allBullets,e;this.bulletsHidden=!1;for(e=0;e<t.length;e++)t[e].show()},hideBullets:function(){var t=this.allBullets,e;this.bulletsHidden=!0;for(e=0;e<t.length;e++)t[e].hide()},showCustomBullets:function(){var t=this.allBullets,e;this.customBulletsHidden=!1;for(e=0;e<t.length;e++)t[e].graphDataItem.customBullet&&t[e].show()},hideCustomBullets:function(){var t=this.allBullets,e;this.customBulletsHidden=!0;for(e=0;e<t.length;e++)t[e].graphDataItem.customBullet&&t[e].hide()},addListeners:function(t,e){var i=this;t.mouseover(function(t){i.handleRollOver(e,t)}).mouseout(function(t){i.handleRollOut(e,t)}).touchend(function(t){i.handleRollOver(e,t);i.chart.panEventsEnabled&&i.handleClick(e,t)}).touchstart(function(t){i.handleRollOver(e,t)}).click(function(t){i.handleClick(e,t)}).dblclick(function(t){i.handleDoubleClick(e,t)}).contextmenu(function(t){i.handleRightClick(e,t)})},handleRollOver:function(t,e){if(t){var i=this.chart,s={type:"rollOverGraphItem",item:t,index:t.index,graph:this,target:this,chart:this.chart,event:e};this.fire("rollOverGraphItem",s);i.fire("rollOverGraphItem",s);clearTimeout(i.hoverInt);s=this.showBalloon;i.chartCursor&&"serial"==i.type&&(s=!1,!i.chartCursor.valueBalloonsEnabled&&this.showBalloon&&(s=!0));if(s){var s=i.formatString(this.balloonText,t,!0),a=this.balloonFunction;a&&(s=a(t,t.graph));s=AmCharts.cleanFromEmpty(s);a=i.getBalloonColor(this,t);i.balloon.showBullet=!1;i.balloon.pointerOrientation="V";var r=t.x,h=t.y;i.rotate&&(r=t.y,h=t.x);i.showBalloon(s,a,!0,r+i.marginLeftReal,h+i.marginTopReal)}}this.handleGraphEvent(e,"rollOverGraph")},handleRollOut:function(t,e){this.chart.hideBalloon();if(t){var i={type:"rollOutGraphItem",item:t,index:t.index,graph:this,target:this,chart:this.chart,event:e};this.fire("rollOutGraphItem",i);this.chart.fire("rollOutGraphItem",i)}this.handleGraphEvent(e,"rollOutGraph")},handleClick:function(t,e){if(t){var i={type:"clickGraphItem",item:t,index:t.index,graph:this,target:this,chart:this.chart,event:e};this.fire("clickGraphItem",i);this.chart.fire("clickGraphItem",i);AmCharts.getURL(t.url,this.urlTarget)}this.handleGraphEvent(e,"clickGraph")},handleGraphEvent:function(t,e){var i={type:e,graph:this,target:this,chart:this.chart,event:t};this.fire(e,i);this.chart.fire(e,i)},handleRightClick:function(t,e){if(t){var i={type:"rightClickGraphItem",item:t,index:t.index,graph:this,target:this,chart:this.chart,event:e};this.fire("rightClickGraphItem",i);this.chart.fire("rightClickGraphItem",i)}},handleDoubleClick:function(t,e){if(t){var i={type:"doubleClickGraphItem",item:t,index:t.index,graph:this,target:this,chart:this.chart,event:e};this.fire("doubleClickGraphItem",i);this.chart.fire("doubleClickGraphItem",i)}},zoom:function(t,e){this.start=t;this.end=e;this.draw()},changeOpacity:function(t){var e=this.set;e&&e.setAttr("opacity",t);if(e=this.ownColumns){var i;for(i=0;i<e.length;i++){var s=e[i].set;s&&s.setAttr("opacity",t)}}(e=this.bulletSet)&&e.setAttr("opacity",t)},destroy:function(){AmCharts.remove(this.set);AmCharts.remove(this.bulletSet);var t=this.timeOuts;if(t){var e;for(e=0;e<t.length;e++)clearTimeout(t[e])}this.timeOuts=[]}});AmCharts.ChartCursor=AmCharts.Class({construct:function(t){this.cname="ChartCursor";this.createEvents("changed","zoomed","onHideCursor","draw","selected","moved");this.enabled=!0;this.cursorAlpha=1;this.selectionAlpha=.2;this.cursorColor="#CC0000";this.categoryBalloonAlpha=1;this.color="#FFFFFF";this.type="cursor";this.zoomed=!1;this.zoomable=!0;this.pan=!1;this.categoryBalloonDateFormat="MMM DD, YYYY";this.categoryBalloonEnabled=this.valueBalloonsEnabled=!0;this.rolledOver=!1;this.cursorPosition="middle";this.bulletsEnabled=this.skipZoomDispatch=!1;this.bulletSize=8;this.selectWithoutZooming=this.oneBalloonOnly=!1;this.graphBulletSize=1.7;this.animationDuration=.3;this.zooming=!1;this.adjustment=0;this.avoidBalloonOverlapping=!0;this.leaveCursor=!1;AmCharts.applyTheme(this,t,this.cname)},draw:function(){var t=this;t.destroy();var e=t.chart,i=e.container;t.rotate=e.rotate;t.container=i;i=i.set();i.translate(t.x,t.y);t.set=i;e.cursorSet.push(i);i=new AmCharts.AmBalloon;i.className="category";i.chart=e;t.categoryBalloon=i;AmCharts.copyProperties(e.balloon,i);i.cornerRadius=0;i.shadowAlpha=0;i.borderThickness=1;i.borderAlpha=1;i.showBullet=!1;var s=t.categoryBalloonColor;void 0===s&&(s=t.cursorColor);i.fillColor=s;i.fillAlpha=t.categoryBalloonAlpha;i.borderColor=s;i.color=t.color;s=t.valueLineAxis;AmCharts.isString(s)&&(s=e.getValueAxisById(s));s||(s=e.valueAxes[0]);t.valueLineAxis=s;t.valueLineBalloonEnabled&&(s=new AmCharts.AmBalloon,s.chart=e,t.vaBalloon=s,AmCharts.copyProperties(i,s),s.animationDuration=0,t.rotate||(s.pointerOrientation="H"));t.rotate&&(i.pointerOrientation="H");t.extraWidth=0;t.prevX=[];t.prevY=[];t.prevTX=[];t.prevTY=[];if(t.valueBalloonsEnabled)for(i=0;i<e.graphs.length;i++)s=new AmCharts.AmBalloon,s.className=e.graphs[i].id,s.chart=e,AmCharts.copyProperties(e.balloon,s),e.graphs[i].valueBalloon=s;"cursor"==t.type?t.createCursor():t.createCrosshair();t.interval=setInterval(function(){t.detectMovement.call(t)},40)},updateData:function(){var t=this.chart;this.data=t.chartData;this.firstTime=t.firstTime;this.lastTime=t.lastTime},createCursor:function(){var t=this.chart,e=this.cursorAlpha,i=t.categoryAxis,s=this.categoryBalloon,a,r,h,o;h=t.dx;o=t.dy;var n=this.width,l=this.height,d=t.rotate;s.pointerWidth=i.tickLength;d?(a=[0,n,n+h],r=[0,0,o],h=[h,0,0],o=[o,0,l]):(a=[h,0,0],r=[o,0,l],h=[0,n,n+h],o=[0,0,o]);a=AmCharts.line(this.container,a,r,this.cursorColor,e,1);AmCharts.setCN(t,a,"cursor-line");this.line=a;(r=this.fullRectSet)?(r.push(a),r.translate(this.x,this.y)):this.set.push(a);this.valueLineEnabled&&(a=this.valueLineAlpha,isNaN(a)||(e=a),e=AmCharts.line(this.container,h,o,this.cursorColor,e,1),AmCharts.setCN(t,e,"cursor-value-line"),this.vLine=e,this.set.push(e));this.setBalloonBounds(s,i,d);(t=this.vaBalloon)&&this.setBalloonBounds(t,this.valueLineAxis,!d);this.hideCursor()},createCrosshair:function(){var t=this.cursorAlpha,e=this.container,i=AmCharts.line(e,[0,0],[0,this.height],this.cursorColor,t,1),t=AmCharts.line(e,[0,this.width],[0,0],this.cursorColor,t,1);AmCharts.setCN(this.chart,i,"cursor-line");AmCharts.setCN(this.chart,t,"cursor-line");this.set.push(i);this.set.push(t);this.vLine=i;this.hLine=t;this.hideCursor()},detectMovement:function(){var t=this.chart;if(t.mouseIsOver){var e=t.mouseX-this.x,i=t.mouseY-this.y;-.5<e&&e<this.width+1&&0<i&&i<this.height?(this.drawing?this.rolledOver||t.setMouseCursor("crosshair"):this.pan&&(this.rolledOver||t.setMouseCursor("move")),this.rolledOver=!0,(this.valueLineEnabled||this.valueLineBalloonEnabled)&&this.updateVLine(e,i),this.setPosition()):this.rolledOver&&(this.handleMouseOut(),this.rolledOver=!1)}else this.rolledOver&&(this.handleMouseOut(),this.rolledOver=!1)},updateVLine:function(t,e){var i=this.vLine,s=this.vaBalloon;if((i||s)&&!this.panning&&!this.drawing){i&&i.show();var a=this.valueLineAxis,r,h=this.rotate;h?(i&&i.translate(t,0),a&&(r=a.coordinateToValue(t)),i=t):(i&&i.translate(0,e),a&&(r=a.coordinateToValue(e)),i=e-1);if(s&&!isNaN(r)&&this.prevLineValue!=r){var o=a.formatValue(r,!0);s&&(this.setBalloonPosition(s,a,i,!h),s.showBalloon(o))}this.prevLineValue=r}},getMousePosition:function(){var t,e=this.width,i=this.height;t=this.chart;this.rotate?(t=t.mouseY-this.y,0>t&&(t=0),t>i&&(t=i)):(t=t.mouseX-this.x-1,0>t&&(t=0),t>e&&(t=e));return t},updateCrosshair:function(){var t=this.chart,e=t.mouseX-this.x,i=t.mouseY-this.y,s=this.vLine,a=this.hLine,e=AmCharts.fitToBounds(e,0,this.width),i=AmCharts.fitToBounds(i,0,this.height);0<this.cursorAlpha&&(s.show(),a.show(),s.translate(e,0),a.translate(0,i));this.zooming&&(t.hideXScrollbar&&(e=NaN),t.hideYScrollbar&&(i=NaN),this.updateSelectionSize(e,i));this.fireMoved();t.mouseIsOver||this.zooming||this.hideCursor()},fireMoved:function(){var t=this.chart,e={type:"moved",target:this};e.chart=t;e.zooming=this.zooming;e.x=t.mouseX-this.x;e.y=t.mouseY-this.y;this.fire("moved",e)},updateSelectionSize:function(t,e){AmCharts.remove(this.selection);var i=this.selectionPosX,s=this.selectionPosY,a=0,r=0,h=this.width,o=this.height;isNaN(t)||(i>t&&(a=t,h=i-t),i<t&&(a=i,h=t-i),i==t&&(a=t,h=0),h+=this.extraWidth,a-=this.extraWidth/2);isNaN(e)||(s>e&&(r=e,o=s-e),s<e&&(r=s,o=e-s),s==e&&(r=e,o=0),o+=this.extraWidth,r-=this.extraWidth/2);0<h&&0<o&&(i=AmCharts.rect(this.container,h,o,this.cursorColor,this.selectionAlpha),AmCharts.setCN(this.chart,i,"cursor-selection"),i.translate(a+this.x,r+this.y),this.selection=i)},arrangeBalloons:function(){var t=this.valueBalloons,e=this.x,i=this.y,s=this.height+i;

t.sort(this.compareY);var a;for(a=0;a<t.length;a++){var r=t[a].balloon;r.setBounds(e,i,e+this.width,s);r.prevX=this.prevX[a];r.prevY=this.prevY[a];r.prevTX=this.prevTX[a];r.prevTY=this.prevTY[a];r.draw();s=r.yPos-3}this.arrangeBalloons2()},compareY:function(t,e){return t.yy<e.yy?1:-1},arrangeBalloons2:function(){var t=this.valueBalloons;t.reverse();var e,i=this.x,s,a,r=t.length;for(a=0;a<r;a++){var h=t[a].balloon;e=h.bottom;var o=h.bottom-h.yPos,n=r-a-1;0<a&&e-o<s+3&&(h.setBounds(i,s+3,i+this.width,s+o+3),h.prevX=this.prevX[n],h.prevY=this.prevY[n],h.prevTX=this.prevTX[n],h.prevTY=this.prevTY[n],h.draw());h.set&&h.set.show();this.prevX[n]=h.prevX;this.prevY[n]=h.prevY;this.prevTX[n]=h.prevTX;this.prevTY[n]=h.prevTY;s=h.bottom}},showBullets:function(){AmCharts.remove(this.allBullets);var t=this.container,e=t.set();this.set.push(e);this.set.show();this.allBullets=e;var e=this.chart.graphs,i;for(i=0;i<e.length;i++){var s=e[i];if(!s.hidden&&s.balloonText){var a=this.data[this.index].axes[s.valueAxis.id].graphs[s.id],r=a.y;if(!isNaN(r)){var h,o;h=a.x;this.rotate?(o=r,r=h):o=h;s=AmCharts.circle(t,this.bulletSize/2,this.chart.getBalloonColor(s,a,!0),s.cursorBulletAlpha);s.translate(o,r);this.allBullets.push(s)}}}},destroy:function(){this.clear();AmCharts.remove(this.selection);this.selection=null;var t=this.categoryBalloon;t&&t.destroy();(t=this.vaBalloon)&&t.destroy();this.destroyValueBalloons();AmCharts.remove(this.set)},clear:function(){clearInterval(this.interval)},destroyValueBalloons:function(){var t=this.valueBalloons;if(t){var e;for(e=0;e<t.length;e++)t[e].balloon.hide()}},zoom:function(t,e,i,s){var a=this.chart;this.destroyValueBalloons();this.zooming=!1;var r;this.rotate?this.selectionPosY=r=a.mouseY:this.selectionPosX=r=a.mouseX;this.start=t;this.end=e;this.startTime=i;this.endTime=s;this.zoomed=!0;s=a.categoryAxis;r=this.rotate;e=this.width;i=this.height;t=s.stepWidth;if(this.fullWidth){var h=1;s.parseDates&&!s.equalSpacing&&(h=s.minDuration());r?this.extraWidth=i=t*h:(this.extraWidth=e=t*h,this.categoryBalloon.minWidth=e);this.line&&this.line.remove();this.line=AmCharts.rect(this.container,e,i,this.cursorColor,this.cursorAlpha,0);AmCharts.setCN(a,this.line,"cursor-fill");this.fullRectSet&&this.fullRectSet.push(this.line)}this.stepWidth=t;this.tempVal=this.valueBalloonsEnabled;this.valueBalloonsEnabled=!1;this.setPosition();this.valueBalloonsEnabled=this.tempVal;this.hideCursor()},hideObj:function(t){t&&t.hide()},hideCursor:function(t){void 0===t&&(t=!0);this.leaveCursor||(this.hideObj(this.set),this.hideObj(this.categoryBalloon),this.hideObj(this.line),this.hideObj(this.vLine),this.hideObj(this.hLine),this.hideObj(this.vaBalloon),this.hideObj(this.allBullets),this.destroyValueBalloons(),this.selectWithoutZooming||AmCharts.remove(this.selection),this.previousIndex=NaN,t&&this.fire("onHideCursor",{type:"onHideCursor",chart:this.chart,target:this}),this.drawing||this.chart.setMouseCursor("auto"),this.normalizeBulletSize())},setPosition:function(t,e,i){void 0===e&&(e=!0);if("cursor"==this.type){if(this.tempPosition=NaN,AmCharts.ifArray(this.data))isNaN(t)&&(t=this.getMousePosition()),(t!=this.previousMousePosition||!0===this.zoomed||this.oneBalloonOnly)&&!isNaN(t)&&("mouse"==this.cursorPosition&&(this.tempPosition=t),isNaN(i)&&(i=this.chart.categoryAxis.xToIndex(t)),i!=this.previousIndex||this.zoomed||"mouse"==this.cursorPosition||this.oneBalloonOnly)&&(this.updateCursor(i,e),this.zoomed=!1),this.previousMousePosition=t}else this.updateCrosshair()},normalizeBulletSize:function(){var t=this.resizedBullets;if(t)for(var e=0;e<t.length;e++){var i=t[e],s=i.bulletGraphics;s&&(s.translate(i.bx,i.by,1),i=i.graph,isNaN(this.graphBulletAlpha)||(s.setAttr("fill-opacity",i.bulletAlpha),s.setAttr("stroke-opacity",i.bulletBorderAlpha)))}},updateCursor:function(t,e){var i=this.chart,s=this.fullWidth,a=i.mouseX-this.x,r=i.mouseY-this.y;this.drawingNow&&(AmCharts.remove(this.drawingLine),this.drawingLine=AmCharts.line(this.container,[this.x+this.drawStartX,this.x+a],[this.y+this.drawStartY,this.y+r],this.cursorColor,1,1));if(this.enabled){void 0===e&&(e=!0);this.index=t+=this.adjustment;var h=i.categoryAxis,o=i.dx,n=i.dy,l=this.x+1,d=this.y+1,c=this.width,u=this.height,m=this.data[t];this.fireMoved();if(m){var p=m.x[h.id],f=i.rotate,g=this.stepWidth,v=this.categoryBalloon,C=this.firstTime,A=this.lastTime,b=this.cursorPosition,x=this.zooming,N=this.panning,y=i.graphs;if(i.mouseIsOver||x||N||this.forceShow)if(this.forceShow=!1,N){var o=this.panClickPos,i=this.panClickEndTime,x=this.panClickStartTime,w=this.panClickEnd,l=this.panClickStart,a=(f?o-r:o-a)/g;if(!h.parseDates||h.equalSpacing)a=Math.round(a);0!==a&&(o={type:"zoomed",target:this},o.chart=this.chart,h.parseDates&&!h.equalSpacing?(i+a>A&&(a=A-i),x+a<C&&(a=C-x),o.start=Math.round(x+a),o.end=Math.round(i+a),this.fire(o.type,o)):w+a>=this.data.length||0>l+a||(o.start=l+a,o.end=w+a,this.fire(o.type,o)))}else{"start"==b?p-=h.cellWidth/2:"mouse"==b&&(i.mouseIsOver?p=f?r-2:a-2:isNaN(this.tempPosition)||(p=this.tempPosition-2));if(f){if(0>p)if(x)p=0;else{this.hideCursor();return}if(p>u+1)if(x)p=u+1;else{this.hideCursor();return}}else{if(0>p)if(x)p=0;else{this.hideCursor();return}if(p>c)if(x)p=c;else{this.hideCursor();return}}if(0<this.cursorAlpha){var M=this.line;f?(C=0,A=p+n,s&&(A-=h.cellWidth/2)):(C=p,A=0,s&&(C-=h.cellWidth/2));g=this.animationDuration;0<g&&!this.zooming?isNaN(this.previousX)?M.translate(C,A):(M.translate(this.previousX,this.previousY),M.animate({translate:C+","+A},g,"easeOutSine")):M.translate(C,A);this.previousX=C;this.previousY=A;M.show()}this.linePos=f?p+n:p;x&&(s&&M.hide(),f?this.updateSelectionSize(NaN,p):this.updateSelectionSize(p,NaN));g=!0;x&&(g=!1);this.categoryBalloonEnabled&&g?(this.setBalloonPosition(v,h,p,f),(C=this.categoryBalloonFunction)?v.showBalloon(C(m.category)):h.parseDates?(h=AmCharts.formatDate(m.category,this.categoryBalloonDateFormat,i),-1!=h.indexOf("fff")&&(h=AmCharts.formatMilliseconds(h,m.category)),v.showBalloon(h)):v.showBalloon(AmCharts.fixNewLines(m.category))):v.hide();y&&this.bulletsEnabled&&this.showBullets();if(this.oneBalloonOnly){p=Infinity;for(h=0;h<y.length;h++)C=y[h],C.showBalloon&&!C.hidden&&C.balloonText&&(A=m.axes[C.valueAxis.id].graphs[C.id],v=A.y,isNaN(v)||(f?Math.abs(a-v)<p&&(p=Math.abs(a-v),w=C):Math.abs(r-v)<p&&(p=Math.abs(r-v),w=C)));this.mostCloseGraph&&(w=this.mostCloseGraph)}if(t!=this.previousIndex||w!=this.previousMostCloseGraph)if(this.normalizeBulletSize(),this.destroyValueBalloons(),this.resizedBullets=[],y&&this.valueBalloonsEnabled&&g&&i.balloon.enabled){this.valueBalloons=g=[];for(h=0;h<y.length;h++)if(C=y[h],v=NaN,(!this.oneBalloonOnly||C==w)&&C.showBalloon&&!C.hidden&&C.balloonText&&("step"==C.type&&"left"==C.stepDirection&&(m=this.data[t+1]),m)){if(A=m.axes[C.valueAxis.id].graphs[C.id])v=A.y;if(this.showNextAvailable&&isNaN(v)&&t+1<this.data.length)for(p=t+1;p<this.data.length;p++)if(s=this.data[p])if(A=s.axes[C.valueAxis.id].graphs[C.id],v=A.y,!isNaN(v))break;if(!isNaN(v)){s=A.x;n=!0;if(f){if(p=v,0>s||s>u)n=!1}else if(p=s,s=v,0>p||p>c+o+1)n=!1;n&&(n=this.graphBulletSize,M=this.graphBulletAlpha,1==n&&isNaN(M)||!AmCharts.isModern||!(b=A.bulletGraphics)||(b.getBBox(),b.translate(A.bx,A.by,n),this.resizedBullets.push(A),isNaN(M)||(b.setAttr("fill-opacity",M),b.setAttr("stroke-opacity",M))),n=C.valueBalloon,M=i.getBalloonColor(C,A),n.setBounds(l,d,l+c,d+u),n.pointerOrientation="H",b=this.balloonPointerOrientation,"vertical"==b&&(n.pointerOrientation="V"),"horizontal"==b&&(n.pointerOrientation="H"),n.changeColor(M),void 0!==C.balloonAlpha&&(n.fillAlpha=C.balloonAlpha),void 0!==C.balloonTextColor&&(n.color=C.balloonTextColor),n.setPosition(p+l,s+d),p=i.formatString(C.balloonText,A,!0),(s=C.balloonFunction)&&(p=s(A,C).toString()),""!==p&&(f?n.showBalloon(p):(n.text=p,n.show=!0),g.push({yy:v,balloon:n})),!f&&n.set&&(n.set.hide(),C=n.textDiv)&&(C.style.visibility="hidden"))}}this.avoidBalloonOverlapping&&this.arrangeBalloons()}e?(o={type:"changed"},o.index=t,o.chart=this.chart,o.zooming=x,o.mostCloseGraph=w,o.position=f?r:a,o.target=this,i.fire("changed",o),this.fire("changed",o),this.skipZoomDispatch=!1):(this.skipZoomDispatch=!0,i.updateLegendValues(t));this.previousIndex=t;this.previousMostCloseGraph=w}}}else this.hideCursor()},setBalloonPosition:function(t,e,i,s){var a=e.position,r=e.inside;e=e.axisThickness;var h=this.chart,o=h.dx,h=h.dy,n=this.x,l=this.y,d=this.width,c=this.height;s?(r&&("right"==a?t.setBounds(n,l+h,n+d+o,l+i+h):t.setBounds(n,l+h,n+d+o,l+i)),"right"==a?r?t.setPosition(n+d+o,l+i+h):t.setPosition(n+d+o+e,l+i+h):r?t.setPosition(n,l+i):t.setPosition(n-e,l+i)):"top"==a?r?t.setPosition(n+i+o,l+h):t.setPosition(n+i+o,l+h-e+1):r?t.setPosition(n+i,l+c):t.setPosition(n+i,l+c+e-1)},setBalloonBounds:function(t,e,i){var s=e.position,a=e.inside,r=e.axisThickness,h=e.tickLength,o=this.chart,n=o.dx,o=o.dy,l=this.x,d=this.y,c=this.width,u=this.height;i?(a&&(t.pointerWidth=0),"right"==s?a?t.setBounds(l,d+o,l+c+n,d+u+o):t.setBounds(l+c+n+r,d+o,l+c+1e3,d+u+o):a?t.setBounds(l,d,c+l,u+d):t.setBounds(-1e3,-1e3,l-h-r,d+u+15)):(t.maxWidth=c,e.parseDates&&(h=0,t.pointerWidth=0),"top"==s?a?t.setBounds(l+n,d+o,c+n+l,u+d):t.setBounds(l+n,-1e3,c+n+l,d+o-h-r):a?t.setBounds(l,d,c+l,u+d-h):t.setBounds(l,d+u+h+r-1,l+c,d+u+h+r))},enableDrawing:function(t){this.enabled=!t;this.hideCursor();this.rolledOver=!1;this.drawing=t},isZooming:function(t){t&&t!=this.zooming&&this.handleMouseDown("fake");t||t==this.zooming||this.handleMouseUp()},handleMouseOut:function(){if(this.enabled)if(this.zooming)this.setPosition();else{this.index=void 0;var t={type:"changed",index:void 0,target:this};t.chart=this.chart;this.fire("changed",t);this.hideCursor()}},handleReleaseOutside:function(){this.handleMouseUp()},handleMouseUp:function(){var t=this.chart,e=this.data,i;if(t){var s=t.mouseX-this.x,a=t.mouseY-this.y;if(this.drawingNow){this.drawingNow=!1;AmCharts.remove(this.drawingLine);i=this.drawStartX;var r=this.drawStartY;if(2<Math.abs(i-s)||2<Math.abs(r-a))i={type:"draw",target:this,chart:t,initialX:i,initialY:r,finalX:s,finalY:a},this.fire(i.type,i)}if(this.enabled&&0<e.length){if(this.pan)this.rolledOver=!1;else if(this.zoomable&&this.zooming){i=this.selectWithoutZooming?{type:"selected"}:{type:"zoomed"};i.target=this;i.chart=t;if("cursor"==this.type)this.rotate?this.selectionPosY=a:this.selectionPosX=a=s,4>Math.abs(a-this.initialMouse)&&this.fromIndex==this.index||(this.index<this.fromIndex?(i.end=this.fromIndex,i.start=this.index):(i.end=this.index,i.start=this.fromIndex),a=t.categoryAxis,a.parseDates&&!a.equalSpacing&&(e[i.start]&&(i.start=e[i.start].time),e[i.end]&&(i.end=t.getEndTime(e[i.end].time))),this.skipZoomDispatch||this.fire(i.type,i));else{var h=this.initialMouseX,o=this.initialMouseY;3>Math.abs(s-h)&&3>Math.abs(a-o)||(e=Math.min(h,s),r=Math.min(o,a),s=Math.abs(h-s),a=Math.abs(o-a),t.hideXScrollbar&&(e=0,s=this.width),t.hideYScrollbar&&(r=0,a=this.height),i.selectionHeight=a,i.selectionWidth=s,i.selectionY=r,i.selectionX=e,this.skipZoomDispatch||this.fire(i.type,i))}this.selectWithoutZooming||AmCharts.remove(this.selection)}this.skipZoomDispatch=!1}}this.panning=this.zooming=!1},showCursorAt:function(t){var e=this.chart.categoryAxis;t=e.parseDates?e.dateToCoordinate(t):e.categoryToCoordinate(t);this.previousMousePosition=NaN;this.forceShow=!0;this.setPosition(t,!1)},clearSelection:function(){AmCharts.remove(this.selection)},handleMouseDown:function(t){if(this.zoomable||this.pan||this.drawing){var e=this.rotate,i=this.chart,s=i.mouseX-this.x,a=i.mouseY-this.y;if(0<s&&s<this.width&&0<a&&a<this.height||"fake"==t)this.setPosition(),this.selectWithoutZooming&&AmCharts.remove(this.selection),this.drawing?(this.drawStartY=a,this.drawStartX=s,this.drawingNow=!0):this.pan?(this.zoomable=!1,i.setMouseCursor("move"),this.panning=!0,this.panClickPos=e?a:s,this.panClickStart=this.start,this.panClickEnd=this.end,this.panClickStartTime=this.startTime,this.panClickEndTime=this.endTime):this.zoomable&&("cursor"==this.type?(this.fromIndex=this.index,e?(this.initialMouse=a,this.selectionPosY=this.linePos):(this.initialMouse=s,this.selectionPosX=this.linePos)):(this.initialMouseX=s,this.initialMouseY=a,this.selectionPosX=s,this.selectionPosY=a),this.zooming=!0)}}});AmCharts.SimpleChartScrollbar=AmCharts.Class({construct:function(t){this.createEvents("zoomed");this.backgroundColor="#D4D4D4";this.backgroundAlpha=1;this.selectedBackgroundColor="#EFEFEF";this.scrollDuration=this.selectedBackgroundAlpha=1;this.resizeEnabled=!0;this.hideResizeGrips=!1;this.scrollbarHeight=20;this.updateOnReleaseOnly=!1;9>document.documentMode&&(this.updateOnReleaseOnly=!0);this.dragIconWidth=18;this.dragIconHeight=25;AmCharts.applyTheme(this,t,"SimpleChartScrollbar")},draw:function(){var t=this;t.destroy();if(t.enabled){t.interval=setInterval(function(){t.updateScrollbar.call(t)},40);var e=t.chart.container,i=t.rotate,s=t.chart,a=e.set();t.set=a;s.scrollbarsSet.push(a);var r,h;i?(r=t.scrollbarHeight,h=s.plotAreaHeight):(h=t.scrollbarHeight,r=s.plotAreaWidth);t.width=r;if((t.height=h)&&r){var o=AmCharts.rect(e,r,h,t.backgroundColor,t.backgroundAlpha,1,t.backgroundColor,t.backgroundAlpha);AmCharts.setCN(s,o,"scrollbar-bg");t.bg=o;a.push(o);o=AmCharts.rect(e,r,h,"#000",.005);a.push(o);t.invisibleBg=o;o.click(function(){t.handleBgClick()}).mouseover(function(){t.handleMouseOver()}).mouseout(function(){t.handleMouseOut()}).touchend(function(){t.handleBgClick()});o=AmCharts.rect(e,r,h,t.selectedBackgroundColor,t.selectedBackgroundAlpha);AmCharts.setCN(s,o,"scrollbar-bg-selected");t.selectedBG=o;a.push(o);r=AmCharts.rect(e,r,h,"#000",.005);t.dragger=r;a.push(r);r.mousedown(function(e){t.handleDragStart(e)}).mouseup(function(){t.handleDragStop()}).mouseover(function(){t.handleDraggerOver()}).mouseout(function(){t.handleMouseOut()}).touchstart(function(e){t.handleDragStart(e)}).touchend(function(){t.handleDragStop()});r=s.pathToImages;i?(o=r+"dragIconH.gif",r=t.dragIconWidth,i=t.dragIconHeight):(o=r+"dragIcon.gif",i=t.dragIconWidth,r=t.dragIconHeight);h=e.image(o,0,0,i,r);AmCharts.setCN(s,h,"scrollbar-grip-left");o=e.image(o,0,0,i,r);AmCharts.setCN(s,o,"scrollbar-grip-right");var n=10,l=20;s.panEventsEnabled&&(n=25,l=t.scrollbarHeight);var d=AmCharts.rect(e,n,l,"#000",.005),c=AmCharts.rect(e,n,l,"#000",.005);c.translate(-(n-i)/2,-(l-r)/2);d.translate(-(n-i)/2,-(l-r)/2);i=e.set([h,c]);e=e.set([o,d]);t.iconLeft=i;a.push(t.iconLeft);t.iconRight=e;a.push(e);i.mousedown(function(){t.leftDragStart()}).mouseup(function(){t.leftDragStop()}).mouseover(function(){t.iconRollOver()}).mouseout(function(){t.iconRollOut()}).touchstart(function(e){t.leftDragStart()}).touchend(function(){t.leftDragStop()});e.mousedown(function(){t.rightDragStart()}).mouseup(function(){t.rightDragStop()}).mouseover(function(){t.iconRollOver()}).mouseout(function(){t.iconRollOut()}).touchstart(function(e){t.rightDragStart()}).touchend(function(){t.rightDragStop()});AmCharts.ifArray(s.chartData)?a.show():a.hide();t.hideDragIcons();t.clipDragger(!1)}a.translate(t.x,t.y);a.node.style.msTouchAction="none"}},updateScrollbarSize:function(t,e){t=Math.round(t);e=Math.round(e);var i=this.dragger,s,a,r,h;this.rotate?(s=0,a=t,r=this.width+1,h=e-t,i.setAttr("height",e-t),i.setAttr("y",a)):(s=t,a=0,r=e-t,h=this.height+1,i.setAttr("width",e-t),i.setAttr("x",s));this.clipAndUpdate(s,a,r,h)},updateScrollbar:function(){var t,e=!1,i,s,a=this.x,r=this.y,h=this.dragger,o=this.getDBox();if(o){i=o.x+a;s=o.y+r;var n=o.width,o=o.height,l=this.rotate,d=this.chart,c=this.width,u=this.height,m=d.mouseX,p=d.mouseY;t=this.initialMouse;this.forceClip&&this.clipDragger(!0);d.mouseIsOver&&(this.dragging&&(d=this.initialCoord,l?(t=d+(p-t),0>t&&(t=0),d=u-o,t>d&&(t=d),h.setAttr("y",t)):(t=d+(m-t),0>t&&(t=0),d=c-n,t>d&&(t=d),h.setAttr("x",t)),this.clipDragger(!0)),this.resizingRight&&(l?(t=p-s,t+s>u+r&&(t=u-s+r),0>t?(this.resizingRight=!1,e=this.resizingLeft=!0):(0===t&&(t=.1),h.setAttr("height",t))):(t=m-i,t+i>c+a&&(t=c-i+a),0>t?(this.resizingRight=!1,e=this.resizingLeft=!0):(0===t&&(t=.1),h.setAttr("width",t))),this.clipDragger(!0)),this.resizingLeft&&(l?(i=s,s=p,s<r&&(s=r),s>u+r&&(s=u+r),t=!0===e?i-s:o+i-s,0>t?(this.resizingRight=!0,this.resizingLeft=!1,h.setAttr("y",i+o-r)):(0===t&&(t=.1),h.setAttr("y",s-r),h.setAttr("height",t))):(s=m,s<a&&(s=a),s>c+a&&(s=c+a),t=!0===e?i-s:n+i-s,0>t?(this.resizingRight=!0,this.resizingLeft=!1,h.setAttr("x",i+n-a)):(0===t&&(t=.1),h.setAttr("x",s-a),h.setAttr("width",t))),this.clipDragger(!0)))}},stopForceClip:function(){this.forceClip=!1},clipDragger:function(t){var e=this.getDBox();if(e){var i=e.x,s=e.y,a=e.width,e=e.height,r=!1;if(this.rotate){if(i=0,a=this.width+1,this.clipY!=s||this.clipH!=e)r=!0}else if(s=0,e=this.height+1,this.clipX!=i||this.clipW!=a)r=!0;r&&(this.clipAndUpdate(i,s,a,e),t&&(this.updateOnReleaseOnly||this.dispatchScrollbarEvent()))}},maskGraphs:function(){},clipAndUpdate:function(t,e,i,s){this.clipX=t;this.clipY=e;this.clipW=i;this.clipH=s;this.selectedBG.clipRect(t,e,i,s);this.updateDragIconPositions();this.maskGraphs(t,e,i,s)},dispatchScrollbarEvent:function(){if(this.skipEvent)this.skipEvent=!1;else{var t=this.chart;t.hideBalloon();var e=this.getDBox(),i=e.x,s=e.y,a=e.width,e=e.height;this.rotate?(i=s,a=this.height/e):a=this.width/a;t={type:"zoomed",position:i,chart:t,target:this,multiplier:a};this.fire(t.type,t)}},updateDragIconPositions:function(){var t=this.getDBox(),e=t.x,i=t.y,s=this.iconLeft,a=this.iconRight,r,h,o=this.scrollbarHeight;this.rotate?(r=this.dragIconWidth,h=this.dragIconHeight,s.translate((o-h)/2,i-r/2),a.translate((o-h)/2,i+t.height-r/2)):(r=this.dragIconHeight,h=this.dragIconWidth,s.translate(e-h/2,(o-r)/2),a.translate(e-h/2+t.width,(o-r)/2))},showDragIcons:function(){this.resizeEnabled&&(this.iconLeft.show(),this.iconRight.show())},hideDragIcons:function(){if(!this.resizingLeft&&!this.resizingRight&&!this.dragging){if(this.hideResizeGrips||!this.resizeEnabled)this.iconLeft.hide(),this.iconRight.hide();this.removeCursors()}},removeCursors:function(){this.chart.setMouseCursor("auto")},relativeZoom:function(t,e){this.enabled&&(this.dragger.stop(),this.multiplier=t,this.position=e,this.updateScrollbarSize(e,this.rotate?e+this.height/t:e+this.width/t))},destroy:function(){this.clear();AmCharts.remove(this.set);AmCharts.remove(this.iconRight);AmCharts.remove(this.iconLeft)},clear:function(){clearInterval(this.interval)},handleDragStart:function(){if(this.enabled){var t=this.chart;this.dragger.stop();this.removeCursors();this.dragging=!0;var e=this.getDBox();this.rotate?(this.initialCoord=e.y,this.initialMouse=t.mouseY):(this.initialCoord=e.x,this.initialMouse=t.mouseX)}},handleDragStop:function(){this.updateOnReleaseOnly&&(this.updateScrollbar(),this.skipEvent=!1,this.dispatchScrollbarEvent());this.dragging=!1;this.mouseIsOver&&this.removeCursors();this.updateScrollbar()},handleDraggerOver:function(){this.handleMouseOver()},leftDragStart:function(){this.dragger.stop();this.resizingLeft=!0},leftDragStop:function(){this.resizingLeft=!1;this.mouseIsOver||this.removeCursors();this.updateOnRelease()},rightDragStart:function(){this.dragger.stop();this.resizingRight=!0},rightDragStop:function(){this.resizingRight=!1;this.mouseIsOver||this.removeCursors();this.updateOnRelease()},iconRollOut:function(){this.removeCursors()},iconRollOver:function(){this.rotate?this.chart.setMouseCursor("n-resize"):this.chart.setMouseCursor("e-resize");this.handleMouseOver()},getDBox:function(){if(this.dragger)return this.dragger.getBBox()},handleBgClick:function(){var t=this;if(!t.resizingRight&&!t.resizingLeft){t.zooming=!0;var e,i,s=t.scrollDuration,a=t.dragger;e=t.getDBox();var r=e.height,h=e.width;i=t.chart;var o=t.y,n=t.x,l=t.rotate;l?(e="y",i=i.mouseY-r/2-o,i=AmCharts.fitToBounds(i,0,t.height-r)):(e="x",i=i.mouseX-h/2-n,i=AmCharts.fitToBounds(i,0,t.width-h));t.updateOnReleaseOnly?(t.skipEvent=!1,a.setAttr(e,i),t.dispatchScrollbarEvent(),t.clipDragger()):(i=Math.round(i),l?a.animate({y:i},s,">"):a.animate({x:i},s,">"),t.forceClip=!0,clearTimeout(t.forceTO),t.forceTO=setTimeout(function(){t.stopForceClip.call(t)},5e3*s))}},updateOnRelease:function(){this.updateOnReleaseOnly&&(this.updateScrollbar(),this.skipEvent=!1,this.dispatchScrollbarEvent())},handleReleaseOutside:function(){if(this.set){if(this.resizingLeft||this.resizingRight||this.dragging)this.updateOnRelease(),this.removeCursors();this.mouseIsOver=this.dragging=this.resizingRight=this.resizingLeft=!1;this.hideDragIcons();this.updateScrollbar()}},handleMouseOver:function(){this.mouseIsOver=!0;this.showDragIcons()},handleMouseOut:function(){this.mouseIsOver=!1;this.hideDragIcons()}});AmCharts.ChartScrollbar=AmCharts.Class({inherits:AmCharts.SimpleChartScrollbar,construct:function(t){this.cname="ChartScrollbar";AmCharts.ChartScrollbar.base.construct.call(this,t);this.enabled=!0;this.graphLineColor="#BBBBBB";this.graphLineAlpha=0;this.graphFillColor="#BBBBBB";this.graphFillAlpha=1;this.selectedGraphLineColor="#888888";this.selectedGraphLineAlpha=0;this.selectedGraphFillColor="#888888";this.selectedGraphFillAlpha=1;this.gridCount=0;this.gridColor="#FFFFFF";this.gridAlpha=.7;this.skipEvent=this.autoGridCount=!1;this.color="#FFFFFF";this.scrollbarCreated=!1;this.offset=0;AmCharts.applyTheme(this,t,this.cname)},init:function(){var t=this.categoryAxis,e=this.chart;t||(this.categoryAxis=t=new AmCharts.CategoryAxis);t.chart=e;t.id="scrollbar";t.dateFormats=e.categoryAxis.dateFormats;t.markPeriodChange=e.categoryAxis.markPeriodChange;t.boldPeriodBeginning=e.categoryAxis.boldPeriodBeginning;t.axisItemRenderer=AmCharts.RecItem;t.axisRenderer=AmCharts.RecAxis;t.guideFillRenderer=AmCharts.RecFill;t.inside=!0;t.fontSize=this.fontSize;t.tickLength=0;t.axisAlpha=0;AmCharts.isString(this.graph)&&(this.graph=AmCharts.getObjById(e.graphs,this.graph));if(t=this.graph){var i=this.valueAxis;i||(this.valueAxis=i=new AmCharts.ValueAxis,i.visible=!1,i.scrollbar=!0,i.axisItemRenderer=AmCharts.RecItem,i.axisRenderer=AmCharts.RecAxis,i.guideFillRenderer=AmCharts.RecFill,i.labelsEnabled=!1,i.chart=e);e=this.unselectedGraph;e||(e=new AmCharts.AmGraph,e.scrollbar=!0,this.unselectedGraph=e,e.negativeBase=t.negativeBase,e.noStepRisers=t.noStepRisers);e=this.selectedGraph;e||(e=new AmCharts.AmGraph,e.scrollbar=!0,this.selectedGraph=e,e.negativeBase=t.negativeBase,e.noStepRisers=t.noStepRisers)}this.scrollbarCreated=!0},draw:function(){var t=this;AmCharts.ChartScrollbar.base.draw.call(t);if(t.enabled){t.scrollbarCreated||t.init();var e=t.chart,i=e.chartData,s=t.categoryAxis,a=t.rotate,r=t.x,h=t.y,o=t.width,n=t.height,l=e.categoryAxis,d=t.set;s.setOrientation(!a);s.parseDates=l.parseDates;s.rotate=a;s.equalSpacing=l.equalSpacing;s.minPeriod=l.minPeriod;s.startOnAxis=l.startOnAxis;s.viW=o;s.viH=n;s.width=o;s.height=n;s.gridCount=t.gridCount;s.gridColor=t.gridColor;s.gridAlpha=t.gridAlpha;s.color=t.color;s.tickLength=0;s.axisAlpha=0;s.autoGridCount=t.autoGridCount;s.parseDates&&!s.equalSpacing&&s.timeZoom(e.firstTime,e.lastTime);s.zoom(0,i.length-1);if(l=t.graph){var c=t.valueAxis,u=l.valueAxis;c.id=u.id;c.rotate=a;c.setOrientation(a);c.width=o;c.height=n;c.viW=o;c.viH=n;c.dataProvider=i;c.reversed=u.reversed;c.logarithmic=u.logarithmic;c.gridAlpha=0;c.axisAlpha=0;d.push(c.set);a?(c.y=h,c.x=0):(c.x=r,c.y=0);var r=Infinity,h=-Infinity,m;for(m=0;m<i.length;m++){var p=i[m].axes[u.id].graphs[l.id].values,f;for(f in p)if(p.hasOwnProperty(f)&&"percents"!=f&&"total"!=f){var g=p[f];g<r&&(r=g);g>h&&(h=g)}}Infinity!=r&&(c.minimum=r);-Infinity!=h&&(c.maximum=h+.1*(h-r));r==h&&(--c.minimum,c.maximum+=1);void 0!==t.minimum&&(c.minimum=t.minimum);void 0!==t.maximum&&(c.maximum=t.maximum);c.zoom(0,i.length-1);f=t.unselectedGraph;f.id=l.id;f.bcn="scrollbar-graph-";f.rotate=a;f.chart=e;f.data=i;f.valueAxis=c;f.chart=l.chart;f.categoryAxis=t.categoryAxis;f.periodSpan=l.periodSpan;f.valueField=l.valueField;f.openField=l.openField;f.closeField=l.closeField;f.highField=l.highField;f.lowField=l.lowField;f.lineAlpha=t.graphLineAlpha;f.lineColorR=t.graphLineColor;f.fillAlphas=t.graphFillAlpha;f.fillColorsR=t.graphFillColor;f.connect=l.connect;f.hidden=l.hidden;f.width=o;f.height=n;f.pointPosition=l.pointPosition;f.stepDirection=l.stepDirection;f.periodSpan=l.periodSpan;u=t.selectedGraph;u.id=l.id;u.bcn=f.bcn+"selected-";u.rotate=a;u.chart=e;u.data=i;u.valueAxis=c;u.chart=l.chart;u.categoryAxis=s;u.periodSpan=l.periodSpan;u.valueField=l.valueField;u.openField=l.openField;u.closeField=l.closeField;u.highField=l.highField;u.lowField=l.lowField;u.lineAlpha=t.selectedGraphLineAlpha;u.lineColorR=t.selectedGraphLineColor;u.fillAlphas=t.selectedGraphFillAlpha;u.fillColorsR=t.selectedGraphFillColor;u.connect=l.connect;u.hidden=l.hidden;u.width=o;u.height=n;u.pointPosition=l.pointPosition;u.stepDirection=l.stepDirection;u.periodSpan=l.periodSpan;e=t.graphType;e||(e=l.type);f.type=e;u.type=e;i=i.length-1;f.zoom(0,i);u.zoom(0,i);u.set.click(function(){t.handleBackgroundClick()}).mouseover(function(){t.handleMouseOver()}).mouseout(function(){t.handleMouseOut()});f.set.click(function(){t.handleBackgroundClick()}).mouseover(function(){t.handleMouseOver()}).mouseout(function(){t.handleMouseOut()});d.push(f.set);d.push(u.set)}d.push(s.set);d.push(s.labelsSet);t.bg.toBack();t.invisibleBg.toFront();t.dragger.toFront();t.iconLeft.toFront();t.iconRight.toFront()}},timeZoom:function(t,e,i){this.startTime=t;this.endTime=e;this.timeDifference=e-t;this.skipEvent=!AmCharts.toBoolean(i);this.zoomScrollbar();this.skipEvent||this.dispatchScrollbarEvent()},zoom:function(t,e){this.start=t;this.end=e;this.skipEvent=!0;this.zoomScrollbar()},dispatchScrollbarEvent:function(){if(this.skipEvent)this.skipEvent=!1;else{var t=this.chart.chartData,e,i,s=this.dragger.getBBox();e=s.x;var a=s.y,r=s.width,s=s.height,h=this.chart;this.rotate?(e=a,i=s):i=r;r={type:"zoomed",target:this};r.chart=h;var o=this.categoryAxis,n=this.stepWidth,a=h.minSelectedTime,s=!1;if(o.parseDates&&!o.equalSpacing){if(t=h.lastTime,h=h.firstTime,o.minDuration(),o=Math.round(e/n)+h,e=this.dragging?o+this.timeDifference:Math.round((e+i)/n)+h,o>e&&(o=e),0<a&&e-o<a&&(e=Math.round(o+(e-o)/2),s=Math.round(a/2),o=e-s,e+=s,s=!0),e>t&&(e=t),e-a<o&&(o=e-a),o<h&&(o=h),o+a>e&&(e=o+a),o!=this.startTime||e!=this.endTime)this.startTime=o,this.endTime=e,r.start=o,r.end=e,r.startDate=new Date(o),r.endDate=new Date(e),this.fire(r.type,r)}else if(o.startOnAxis||(e+=n/2),i-=this.stepWidth/2,a=o.xToIndex(e),e=o.xToIndex(e+i),a!=this.start||this.end!=e)o.startOnAxis&&(this.resizingRight&&a==e&&e++,this.resizingLeft&&a==e&&(0<a?a--:e=1)),this.start=a,this.end=this.dragging?this.start+this.difference:e,r.start=this.start,r.end=this.end,o.parseDates&&(t[this.start]&&(r.startDate=new Date(t[this.start].time)),t[this.end]&&(r.endDate=new Date(t[this.end].time))),this.fire(r.type,r);s&&this.zoomScrollbar()}},zoomScrollbar:function(){var t,e;t=this.chart;var i=t.chartData,s=this.categoryAxis;s.parseDates&&!s.equalSpacing?(i=s.stepWidth,s=t.firstTime,t=i*(this.startTime-s),e=i*(this.endTime-s)):(t=i[this.start].x[s.id],e=i[this.end].x[s.id],i=s.stepWidth,s.startOnAxis||(s=i/2,t-=s,e+=s));this.stepWidth=i;this.updateScrollbarSize(t,e)},maskGraphs:function(t,e,i,s){var a=this.selectedGraph;a&&a.set.clipRect(t,e,i,s)},handleDragStart:function(){AmCharts.ChartScrollbar.base.handleDragStart.call(this);this.difference=this.end-this.start;this.timeDifference=this.endTime-this.startTime;0>this.timeDifference&&(this.timeDifference=0)},handleBackgroundClick:function(){AmCharts.ChartScrollbar.base.handleBackgroundClick.call(this);this.dragging||(this.difference=this.end-this.start,this.timeDifference=this.endTime-this.startTime,0>this.timeDifference&&(this.timeDifference=0))}});AmCharts.AmBalloon=AmCharts.Class({construct:function(t){this.cname="AmBalloon";this.enabled=!0;this.fillColor="#FFFFFF";this.fillAlpha=.8;this.borderThickness=2;this.borderColor="#FFFFFF";this.borderAlpha=1;this.cornerRadius=0;this.maxWidth=220;this.horizontalPadding=8;this.verticalPadding=4;this.pointerWidth=6;this.pointerOrientation="V";this.color="#000000";this.adjustBorderColor=!0;this.show=this.follow=this.showBullet=!1;this.bulletSize=3;this.shadowAlpha=.4;this.shadowColor="#000000";this.fadeOutDuration=this.animationDuration=.3;this.fixedPosition=!1;this.offsetY=6;this.offsetX=1;this.textAlign="center";AmCharts.isModern||(this.offsetY*=1.5);AmCharts.applyTheme(this,t,this.cname)},draw:function(){var t=this.pointToX,e=this.pointToY;this.deltaSignX=this.deltaSignY=1;var i=this.chart;AmCharts.VML&&(this.fadeOutDuration=0);this.xAnim&&i.stopAnim(this.xAnim);this.yAnim&&i.stopAnim(this.yAnim);if(!isNaN(t)){var s=this.follow,a=i.container,r=this.set;AmCharts.remove(r);this.removeDiv();r=a.set();r.node.style.pointerEvents="none";this.set=r;i.balloonsSet.push(r);if(this.show){var h=this.l,o=this.t,n=this.r,l=this.b,d=this.balloonColor,c=this.fillColor,u=this.borderColor,m=c;void 0!=d&&(this.adjustBorderColor?m=u=d:c=d);var p=this.horizontalPadding,f=this.verticalPadding,g=this.pointerWidth,v=this.pointerOrientation,C=this.cornerRadius,A=i.fontFamily,b=this.fontSize;void 0==b&&(b=i.fontSize);var d=document.createElement("div"),x=i.classNamePrefix;d.className=x+"-balloon-div";this.className&&(d.className=d.className+" "+x+"-balloon-div-"+this.className);x=d.style;x.pointerEvents="none";x.position="absolute";var N=this.minWidth,y="";isNaN(N)||(y="min-width:"+(N-2*p)+"px; ");d.innerHTML='<div style="text-align:'+this.textAlign+"; "+y+"max-width:"+this.maxWidth+"px; font-size:"+b+"px; color:"+this.color+"; font-family:"+A+'">'+this.text+"</div>";i.chartDiv.appendChild(d);this.textDiv=d;b=d.offsetWidth;A=d.offsetHeight;d.clientHeight&&(b=d.clientWidth,A=d.clientHeight);A+=2*f;y=b+2*p;!isNaN(N)&&y<N&&(y=N);window.opera&&(A+=2);var w=!1,b=this.offsetY;i.handDrawn&&(b+=i.handDrawScatter+2);"H"!=v?(N=t-y/2,e<o+A+10&&"down"!=v?(w=!0,s&&(e+=b),b=e+g,this.deltaSignY=-1):(s&&(e-=b),b=e-A-g,this.deltaSignY=1)):(2*g>A&&(g=A/2),b=e-A/2,t<h+(n-h)/2?(N=t+g,this.deltaSignX=-1):(N=t-y-g,this.deltaSignX=1));b+A>=l&&(b=l-A);b<o&&(b=o);N<h&&(N=h);N+y>n&&(N=n-y);var o=b+f,l=N+p,f=this.shadowAlpha,M=this.shadowColor,p=this.borderThickness,S=this.bulletSize,T;0<C||0===g?(0<f&&(t=AmCharts.rect(a,y,A,c,0,p+1,M,f,this.cornerRadius),AmCharts.isModern?t.translate(1,1):t.translate(4,4),r.push(t)),c=AmCharts.rect(a,y,A,c,this.fillAlpha,p,u,this.borderAlpha,this.cornerRadius),this.showBullet&&(T=AmCharts.circle(a,S,m,this.fillAlpha),r.push(T))):(m=[],C=[],"H"!=v?(h=t-N,h>y-g&&(h=y-g),h<g&&(h=g),m=[0,h-g,t-N,h+g,y,y,0,0],C=w?[0,0,e-b,0,0,A,A,0]:[A,A,e-b,A,A,0,0,A]):(m=e-b,m>A-g&&(m=A-g),m<g&&(m=g),C=[0,m-g,e-b,m+g,A,A,0,0],m=t<h+(n-h)/2?[0,0,N<t?0:t-N,0,0,y,y,0]:[y,y,N+y>t?y:t-N,y,y,0,0,y]),0<f&&(t=AmCharts.polygon(a,m,C,c,0,p,M,f),t.translate(1,1),r.push(t)),c=AmCharts.polygon(a,m,C,c,this.fillAlpha,p,u,this.borderAlpha));this.bg=c;r.push(c);c.toFront();AmCharts.setCN(i,c,"balloon-bg");this.className&&AmCharts.setCN(i,c,"balloon-bg-"+this.className);a=1*this.deltaSignX;x.left=l+"px";x.top=o+"px";r.translate(N-a,b);c=c.getBBox();this.bottom=b+A+1;this.yPos=c.y+b;T&&T.translate(this.pointToX-N+a,e-b);e=this.animationDuration;0<this.animationDuration&&!s&&!isNaN(this.prevX)&&(r.translate(this.prevX,this.prevY),r.animate({translate:N-a+","+b},e,"easeOutSine"),d&&(x.left=this.prevTX+"px",x.top=this.prevTY+"px",this.xAnim=i.animate({node:d},"left",this.prevTX,l,e,"easeOutSine","px"),this.yAnim=i.animate({node:d},"top",this.prevTY,o,e,"easeOutSine","px")));this.prevX=N-a;this.prevY=b;this.prevTX=l;this.prevTY=o}}},followMouse:function(){if(this.follow&&this.show){var t=this.chart.mouseX-this.offsetX*this.deltaSignX,e=this.chart.mouseY;this.pointToX=t;this.pointToY=e;if(t!=this.previousX||e!=this.previousY)if(this.previousX=t,this.previousY=e,0===this.cornerRadius)this.draw();else{var i=this.set;if(i){var s=i.getBBox(),t=t-s.width/2,a=e-s.height-10;t<this.l&&(t=this.l);t>this.r-s.width&&(t=this.r-s.width);a<this.t&&(a=e+10);i.translate(t,a);

e=this.textDiv.style;e.left=t+this.horizontalPadding+"px";e.top=a+this.verticalPadding+"px"}}}},changeColor:function(t){this.balloonColor=t},setBounds:function(t,e,i,s){this.l=t;this.t=e;this.r=i;this.b=s;this.destroyTO&&clearTimeout(this.destroyTO)},showBalloon:function(t){this.text=t;this.show=!0;this.destroyTO&&clearTimeout(this.destroyTO);t=this.chart;this.fadeAnim1&&t.stopAnim(this.fadeAnim1);this.fadeAnim2&&t.stopAnim(this.fadeAnim2);this.draw()},hide:function(){var t=this,e=t.fadeOutDuration,i=t.chart;if(0<e){t.destroyTO=setTimeout(function(){t.destroy.call(t)},1e3*e);t.follow=!1;t.show=!1;var s=t.set;s&&(s.setAttr("opacity",t.fillAlpha),t.fadeAnim1=s.animate({opacity:0},e,"easeInSine"));t.textDiv&&(t.fadeAnim2=i.animate({node:t.textDiv},"opacity",1,0,e,"easeInSine",""))}else t.show=!1,t.follow=!1,t.destroy()},setPosition:function(t,e,i){this.pointToX=t;this.pointToY=e;i&&(t==this.previousX&&e==this.previousY||this.draw());this.previousX=t;this.previousY=e},followCursor:function(t){var e=this;(e.follow=t)?(e.pShowBullet=e.showBullet,e.showBullet=!1):void 0!==e.pShowBullet&&(e.showBullet=e.pShowBullet);clearInterval(e.interval);var i=e.chart.mouseX,s=e.chart.mouseY;!isNaN(i)&&t&&(e.pointToX=i-e.offsetX*e.deltaSignX,e.pointToY=s,e.followMouse(),e.interval=setInterval(function(){e.followMouse.call(e)},40))},removeDiv:function(){if(this.textDiv){var t=this.textDiv.parentNode;t&&t.removeChild(this.textDiv)}},destroy:function(){clearInterval(this.interval);AmCharts.remove(this.set);this.removeDiv();this.set=null}});AmCharts.AmCoordinateChart=AmCharts.Class({inherits:AmCharts.AmChart,construct:function(t){AmCharts.AmCoordinateChart.base.construct.call(this,t);this.theme=t;this.createEvents("rollOverGraphItem","rollOutGraphItem","clickGraphItem","doubleClickGraphItem","rightClickGraphItem","clickGraph","rollOverGraph","rollOutGraph");this.startAlpha=1;this.startDuration=0;this.startEffect="elastic";this.sequencedAnimation=!0;this.colors="#FF6600 #FCD202 #B0DE09 #0D8ECF #2A0CD0 #CD0D74 #CC0000 #00CC00 #0000CC #DDDDDD #999999 #333333 #990000".split(" ");this.balloonDateFormat="MMM DD, YYYY";this.valueAxes=[];this.graphs=[];this.guides=[];this.gridAboveGraphs=!1;AmCharts.applyTheme(this,t,"AmCoordinateChart")},initChart:function(){AmCharts.AmCoordinateChart.base.initChart.call(this);var t=this.categoryAxis;t&&(this.categoryAxis=AmCharts.processObject(t,AmCharts.CategoryAxis,this.theme));this.processValueAxes();this.createValueAxes();this.processGraphs();this.processGuides();AmCharts.VML&&(this.startAlpha=1);this.setLegendData(this.graphs);this.gridAboveGraphs&&this.gridSet.toFront()},createValueAxes:function(){if(0===this.valueAxes.length){var t=new AmCharts.ValueAxis;this.addValueAxis(t)}},parseData:function(){this.processValueAxes();this.processGraphs()},parseSerialData:function(){var t=this.graphs,e,i={},s=this.seriesIdField;s||(s=this.categoryField);this.chartData=[];var a=this.dataProvider;if(a){var r=!1,h,o=this.categoryAxis,n,l,d;o&&(r=o.parseDates,n=o.forceShowField,d=o.classNameField,l=o.labelColorField,h=o.categoryFunction);var c,u,m={},p;r&&(e=AmCharts.extractPeriod(o.minPeriod),c=e.period,u=e.count,p=AmCharts.getPeriodDuration(c,u));var f={};this.lookupTable=f;var g,v=this.dataDateFormat,C={};for(g=0;g<a.length;g++){var A={},b=a[g];e=b[this.categoryField];A.dataContext=b;A.category=h?h(e,b,o):String(e);n&&(A.forceShow=b[n]);d&&(A.className=b[d]);l&&(A.labelColor=b[l]);f[b[s]]=A;if(r&&(e=o.categoryFunction?o.categoryFunction(e,b,o):e instanceof Date?AmCharts.newDate(e,o.minPeriod):v?AmCharts.stringToDate(e,v):new Date(e),e=AmCharts.resetDateToMin(e,c,u,o.firstDayOfWeek),A.category=e,A.time=e.getTime(),isNaN(A.time)))continue;var x=this.valueAxes;A.axes={};A.x={};var N;for(N=0;N<x.length;N++){var y=x[N].id;A.axes[y]={};A.axes[y].graphs={};var w;for(w=0;w<t.length;w++){e=t[w];var M=e.id,S=1.1;isNaN(e.gapPeriod)||(S=e.gapPeriod);var T=e.periodValue;if(e.valueAxis.id==y){A.axes[y].graphs[M]={};var D={};D.index=g;var B=b;e.dataProvider&&(B=i);D.values=this.processValues(B,e,T);!e.connect&&C&&C[M]&&A.time-m[M]>=p*S&&(C[M].gap=!0);this.processFields(e,D,B);D.category=A.category;D.serialDataItem=A;D.graph=e;A.axes[y].graphs[M]=D;m[M]=A.time;C[M]=D}}}this.chartData[g]=A}}for(i=0;i<t.length;i++)e=t[i],e.dataProvider&&this.parseGraphData(e)},processValues:function(t,e,i){var s={},a,r=!1;"candlestick"!=e.type&&"ohlc"!=e.type||""===i||(r=!0);a=Number(t[e.valueField+i]);isNaN(a)||(s.value=a);a=Number(t[e.errorField+i]);isNaN(a)||(s.error=a);r&&(i="Open");a=Number(t[e.openField+i]);isNaN(a)||(s.open=a);r&&(i="Close");a=Number(t[e.closeField+i]);isNaN(a)||(s.close=a);r&&(i="Low");a=Number(t[e.lowField+i]);isNaN(a)||(s.low=a);r&&(i="High");a=Number(t[e.highField+i]);isNaN(a)||(s.high=a);return s},parseGraphData:function(t){var e=t.dataProvider,i=t.seriesIdField;i||(i=this.seriesIdField);i||(i=this.categoryField);var s;for(s=0;s<e.length;s++){var a=e[s],r=this.lookupTable[String(a[i])],h=t.valueAxis.id;r&&(h=r.axes[h].graphs[t.id],h.serialDataItem=r,h.values=this.processValues(a,t,t.periodValue),this.processFields(t,h,a))}},addValueAxis:function(t){t.chart=this;this.valueAxes.push(t);this.validateData()},removeValueAxesAndGraphs:function(){var t=this.valueAxes,e;for(e=t.length-1;-1<e;e--)this.removeValueAxis(t[e])},removeValueAxis:function(t){var e=this.graphs,i;for(i=e.length-1;0<=i;i--){var s=e[i];s&&s.valueAxis==t&&this.removeGraph(s)}e=this.valueAxes;for(i=e.length-1;0<=i;i--)e[i]==t&&e.splice(i,1);this.validateData()},addGraph:function(t){this.graphs.push(t);this.chooseGraphColor(t,this.graphs.length-1);this.validateData()},removeGraph:function(t){var e=this.graphs,i;for(i=e.length-1;0<=i;i--)e[i]==t&&(e.splice(i,1),t.destroy());this.validateData()},processValueAxes:function(){var t=this.valueAxes,e;for(e=0;e<t.length;e++){var i=t[e],i=AmCharts.processObject(i,AmCharts.ValueAxis,this.theme);t[e]=i;i.chart=this;i.id||(i.id="valueAxisAuto"+e+"_"+(new Date).getTime());void 0===i.usePrefixes&&(i.usePrefixes=this.usePrefixes)}},processGuides:function(){var t=this.guides,e=this.categoryAxis;if(t)for(var i=0;i<t.length;i++){var s=t[i];(void 0!==s.category||void 0!==s.date)&&e&&e.addGuide(s);s.id||(s.id="guideAuto"+i+"_"+(new Date).getTime());var a=s.valueAxis;a?(AmCharts.isString(a)&&(a=this.getValueAxisById(a)),a?a.addGuide(s):this.valueAxes[0].addGuide(s)):isNaN(s.value)||this.valueAxes[0].addGuide(s)}},processGraphs:function(){var t=this.graphs,e;for(e=0;e<t.length;e++){var i=t[e],i=AmCharts.processObject(i,AmCharts.AmGraph,this.theme);t[e]=i;this.chooseGraphColor(i,e);i.chart=this;AmCharts.isString(i.valueAxis)&&(i.valueAxis=this.getValueAxisById(i.valueAxis));i.valueAxis||(i.valueAxis=this.valueAxes[0]);i.id||(i.id="graphAuto"+e+"_"+(new Date).getTime())}},formatString:function(t,e,i){var s=e.graph,a=s.valueAxis;a.duration&&e.values.value&&(a=AmCharts.formatDuration(e.values.value,a.duration,"",a.durationUnits,a.maxInterval,a.numberFormatter),t=t.split("[[value]]").join(a));t=AmCharts.massReplace(t,{"[[title]]":s.title,"[[description]]":e.description});t=i?AmCharts.fixNewLines(t):AmCharts.fixBrakes(t);return t=AmCharts.cleanFromEmpty(t)},getBalloonColor:function(t,e,i){var s=t.lineColor,a=t.balloonColor;i&&(a=s);i=t.fillColorsR;"object"==typeof i?s=i[0]:void 0!==i&&(s=i);e.isNegative&&(i=t.negativeLineColor,t=t.negativeFillColors,"object"==typeof t?i=t[0]:void 0!==t&&(i=t),void 0!==i&&(s=i));void 0!==e.color&&(s=e.color);void 0===a&&(a=s);return a},getGraphById:function(t){return AmCharts.getObjById(this.graphs,t)},getValueAxisById:function(t){return AmCharts.getObjById(this.valueAxes,t)},processFields:function(t,e,i){if(t.itemColors){var s=t.itemColors,a=e.index;e.color=a<s.length?s[a]:AmCharts.randomColor()}s="lineColor color alpha fillColors description bullet customBullet bulletSize bulletConfig url labelColor dashLength pattern gap className".split(" ");for(a=0;a<s.length;a++){var r=s[a],h=t[r+"Field"];h&&(h=i[h],AmCharts.isDefined(h)&&(e[r]=h))}e.dataContext=i},chooseGraphColor:function(t,e){if(t.lineColor)t.lineColorR=t.lineColor;else{var i;i=this.colors.length>e?this.colors[e]:AmCharts.randomColor();t.lineColorR=i}t.fillColorsR=t.fillColors?t.fillColors:t.lineColorR;t.bulletBorderColorR=t.bulletBorderColor?t.bulletBorderColor:t.useLineColorForBulletBorder?t.lineColorR:t.bulletColor;t.bulletColorR=t.bulletColor?t.bulletColor:t.lineColorR;if(i=this.patterns)t.pattern=i[e]},handleLegendEvent:function(t){var e=t.type;t=t.dataItem;if(!this.legend.data&&t){var i=t.hidden,s=t.showBalloon;switch(e){case"clickMarker":this.textClickEnabled&&(s?this.hideGraphsBalloon(t):this.showGraphsBalloon(t));break;case"clickLabel":s?this.hideGraphsBalloon(t):this.showGraphsBalloon(t);break;case"rollOverItem":i||this.highlightGraph(t);break;case"rollOutItem":i||this.unhighlightGraph();break;case"hideItem":this.hideGraph(t);break;case"showItem":this.showGraph(t)}}},highlightGraph:function(t){var e=this.graphs,i,s=.2;this.legend&&(s=this.legend.rollOverGraphAlpha);if(1!=s)for(i=0;i<e.length;i++){var a=e[i];a!=t&&a.changeOpacity(s)}},unhighlightGraph:function(){var t;this.legend&&(t=this.legend.rollOverGraphAlpha);if(1!=t){t=this.graphs;var e;for(e=0;e<t.length;e++)t[e].changeOpacity(1)}},showGraph:function(t){t.switchable&&(t.hidden=!1,this.dataChanged=!0,"xy"!=this.type&&(this.marginsUpdated=!1),this.chartCreated&&this.initChart())},hideGraph:function(t){t.switchable&&(this.dataChanged=!0,"xy"!=this.type&&(this.marginsUpdated=!1),t.hidden=!0,this.chartCreated&&this.initChart())},hideGraphsBalloon:function(t){t.showBalloon=!1;this.updateLegend()},showGraphsBalloon:function(t){t.showBalloon=!0;this.updateLegend()},updateLegend:function(){this.legend&&this.legend.invalidateSize()},resetAnimation:function(){var t=this.graphs;if(t){var e;for(e=0;e<t.length;e++)t[e].animationPlayed=!1}},animateAgain:function(){this.resetAnimation();this.validateNow()}});AmCharts.AmSlicedChart=AmCharts.Class({inherits:AmCharts.AmChart,construct:function(t){this.createEvents("rollOverSlice","rollOutSlice","clickSlice","pullOutSlice","pullInSlice","rightClickSlice");AmCharts.AmSlicedChart.base.construct.call(this,t);this.colors="#FF0F00 #FF6600 #FF9E01 #FCD202 #F8FF01 #B0DE09 #04D215 #0D8ECF #0D52D1 #2A0CD0 #8A0CCF #CD0D74 #754DEB #DDDDDD #999999 #333333 #000000 #57032A #CA9726 #990000 #4B0C25".split(" ");this.alpha=1;this.groupPercent=0;this.groupedTitle="Other";this.groupedPulled=!1;this.groupedAlpha=1;this.marginLeft=0;this.marginBottom=this.marginTop=10;this.marginRight=0;this.hoverAlpha=1;this.outlineColor="#FFFFFF";this.outlineAlpha=0;this.outlineThickness=1;this.startAlpha=0;this.startDuration=1;this.startEffect="bounce";this.sequencedAnimation=!0;this.pullOutDuration=1;this.pullOutEffect="bounce";this.pullOnHover=this.pullOutOnlyOne=!1;this.labelsEnabled=!0;this.labelTickColor="#000000";this.labelTickAlpha=.2;this.hideLabelsPercent=0;this.urlTarget="_self";this.autoMarginOffset=10;this.gradientRatio=[];this.maxLabelWidth=200;AmCharts.applyTheme(this,t,"AmSlicedChart")},initChart:function(){AmCharts.AmSlicedChart.base.initChart.call(this);this.dataChanged&&(this.parseData(),this.dispatchDataUpdated=!0,this.dataChanged=!1,this.setLegendData(this.chartData));this.drawChart()},handleLegendEvent:function(t){var e=t.type,i=t.dataItem,s=this.legend;if(!s.data&&i){var a=i.hidden;t=t.event;switch(e){case"clickMarker":a||s.switchable||this.clickSlice(i,t);break;case"clickLabel":a||this.clickSlice(i,t,!1);break;case"rollOverItem":a||this.rollOverSlice(i,!1,t);break;case"rollOutItem":a||this.rollOutSlice(i,t);break;case"hideItem":this.hideSlice(i,t);break;case"showItem":this.showSlice(i,t)}}},invalidateVisibility:function(){this.recalculatePercents();this.initChart();var t=this.legend;t&&t.invalidateSize()},addEventListeners:function(t,e){var i=this;t.mouseover(function(t){i.rollOverSlice(e,!0,t)}).mouseout(function(t){i.rollOutSlice(e,t)}).touchend(function(t){i.rollOverSlice(e,t);i.panEventsEnabled&&i.clickSlice(e,t)}).touchstart(function(t){i.rollOverSlice(e,t)}).click(function(t){i.clickSlice(e,t)}).contextmenu(function(t){i.handleRightClick(e,t)})},formatString:function(t,e,i){t=AmCharts.formatValue(t,e,["value"],this.nf,"",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers);t=AmCharts.formatValue(t,e,["percents"],this.pf);t=AmCharts.massReplace(t,{"[[title]]":e.title,"[[description]]":e.description});-1!=t.indexOf("[[")&&(t=AmCharts.formatDataContextValue(t,e.dataContext));t=i?AmCharts.fixNewLines(t):AmCharts.fixBrakes(t);return t=AmCharts.cleanFromEmpty(t)},startSlices:function(){var t;for(t=0;t<this.chartData.length;t++)0<this.startDuration&&this.sequencedAnimation?this.setStartTO(t):this.startSlice(this.chartData[t])},setStartTO:function(t){var e=this;t=setTimeout(function(){e.startSequenced.call(e)},e.startDuration/e.chartData.length*500*t);e.timeOuts.push(t)},pullSlices:function(t){var e=this.chartData,i;for(i=0;i<e.length;i++){var s=e[i];s.pulled&&this.pullSlice(s,1,t)}},startSequenced:function(){var t=this.chartData,e;for(e=0;e<t.length;e++)if(!t[e].started){this.startSlice(this.chartData[e]);break}},startSlice:function(t){t.started=!0;var e=t.wedge,i=this.startDuration;e&&0<i&&(0<t.alpha&&e.show(),e.translate(t.startX,t.startY),e.animate({opacity:1,translate:"0,0"},i,this.startEffect))},showLabels:function(){var t=this.chartData,e;for(e=0;e<t.length;e++){var i=t[e];if(0<i.alpha){var s=i.label;s&&s.show();(i=i.tick)&&i.show()}}},showSlice:function(t){isNaN(t)?t.hidden=!1:this.chartData[t].hidden=!1;this.invalidateVisibility()},hideSlice:function(t){isNaN(t)?t.hidden=!0:this.chartData[t].hidden=!0;this.hideBalloon();this.invalidateVisibility()},rollOverSlice:function(t,e,i){isNaN(t)||(t=this.chartData[t]);clearTimeout(this.hoverInt);if(!t.hidden){this.pullOnHover&&this.pullSlice(t,1);1>this.hoverAlpha&&t.wedge&&t.wedge.attr({opacity:this.hoverAlpha});var s=t.balloonX,a=t.balloonY;t.pulled&&(s+=t.pullX,a+=t.pullY);var r=this.formatString(this.balloonText,t,!0),h=this.balloonFunction;h&&(r=h(t,r));h=AmCharts.adjustLuminosity(t.color,-.15);r?this.showBalloon(r,h,e,s,a):this.hideBalloon();0==t.value&&this.hideBalloon();t={type:"rollOverSlice",dataItem:t,chart:this,event:i};this.fire(t.type,t)}},rollOutSlice:function(t,e){isNaN(t)||(t=this.chartData[t]);t.wedge&&t.wedge.attr({opacity:1});this.hideBalloon();var i={type:"rollOutSlice",dataItem:t,chart:this,event:e};this.fire(i.type,i)},clickSlice:function(t,e,i){isNaN(t)||(t=this.chartData[t]);t.pulled?this.pullSlice(t,0):this.pullSlice(t,1);AmCharts.getURL(t.url,this.urlTarget);i||(t={type:"clickSlice",dataItem:t,chart:this,event:e},this.fire(t.type,t))},handleRightClick:function(t,e){isNaN(t)||(t=this.chartData[t]);var i={type:"rightClickSlice",dataItem:t,chart:this,event:e};this.fire(i.type,i)},drawTicks:function(){var t=this.chartData,e;for(e=0;e<t.length;e++){var i=t[e];if(i.label){var s=i.ty,s=AmCharts.line(this.container,[i.tx0,i.tx,i.tx2],[i.ty0,s,s],this.labelTickColor,this.labelTickAlpha);AmCharts.setCN(this,s,this.type+"-tick");AmCharts.setCN(this,s,i.className,!0);i.tick=s;i.wedge.push(s)}}},initialStart:function(){var t=this,e=t.startDuration,i=setTimeout(function(){t.showLabels.call(t)},1e3*e);t.timeOuts.push(i);t.chartCreated?t.pullSlices(!0):(t.startSlices(),0<e?(e=setTimeout(function(){t.pullSlices.call(t)},1200*e),t.timeOuts.push(e)):t.pullSlices(!0))},pullSlice:function(t,e,i){var s=this.pullOutDuration;!0===i&&(s=0);(i=t.wedge)&&(0<s?i.animate({translate:e*t.pullX+","+e*t.pullY},s,this.pullOutEffect):i.translate(e*t.pullX,e*t.pullY));1==e?(t.pulled=!0,this.pullOutOnlyOne&&this.pullInAll(t.index),t={type:"pullOutSlice",dataItem:t,chart:this}):(t.pulled=!1,t={type:"pullInSlice",dataItem:t,chart:this});this.fire(t.type,t)},pullInAll:function(t){var e=this.chartData,i;for(i=0;i<this.chartData.length;i++)i!=t&&e[i].pulled&&this.pullSlice(e[i],0)},pullOutAll:function(t){t=this.chartData;var e;for(e=0;e<t.length;e++)t[e].pulled||this.pullSlice(t[e],1)},parseData:function(){var t=[];this.chartData=t;var e=this.dataProvider;isNaN(this.pieAlpha)||(this.alpha=this.pieAlpha);if(void 0!==e){var i=e.length,s=0,a,r,h;for(a=0;a<i;a++){r={};var o=e[a];r.dataContext=o;r.value=Number(o[this.valueField]);(h=o[this.titleField])||(h="");r.title=h;r.pulled=AmCharts.toBoolean(o[this.pulledField],!1);(h=o[this.descriptionField])||(h="");r.description=h;r.labelRadius=Number(o[this.labelRadiusField]);r.switchable=!0;r.className=o[this.classNameField];r.url=o[this.urlField];h=o[this.patternField];!h&&this.patterns&&(h=this.patterns[a]);r.pattern=h;r.visibleInLegend=AmCharts.toBoolean(o[this.visibleInLegendField],!0);h=o[this.alphaField];r.alpha=void 0!==h?Number(h):this.alpha;h=o[this.colorField];void 0!==h&&(r.color=AmCharts.toColor(h));r.labelColor=AmCharts.toColor(o[this.labelColorField]);s+=r.value;r.hidden=!1;t[a]=r}for(a=e=0;a<i;a++)r=t[a],r.percents=r.value/s*100,r.percents<this.groupPercent&&e++;1<e&&(this.groupValue=0,this.removeSmallSlices(),t.push({title:this.groupedTitle,value:this.groupValue,percents:this.groupValue/s*100,pulled:this.groupedPulled,color:this.groupedColor,url:this.groupedUrl,description:this.groupedDescription,alpha:this.groupedAlpha,pattern:this.groupedPattern,className:this.groupedClassName,dataContext:{}}));i=this.baseColor;i||(i=this.pieBaseColor);s=this.brightnessStep;s||(s=this.pieBrightnessStep);for(a=0;a<t.length;a++)i?h=AmCharts.adjustLuminosity(i,a*s/100):(h=this.colors[a],void 0===h&&(h=AmCharts.randomColor())),void 0===t[a].color&&(t[a].color=h);this.recalculatePercents()}},recalculatePercents:function(){var t=this.chartData,e=0,i,s;for(i=0;i<t.length;i++)s=t[i],!s.hidden&&0<s.value&&(e+=s.value);for(i=0;i<t.length;i++)s=this.chartData[i],s.percents=!s.hidden&&0<s.value?100*s.value/e:0},removeSmallSlices:function(){var t=this.chartData,e;for(e=t.length-1;0<=e;e--)t[e].percents<this.groupPercent&&(this.groupValue+=t[e].value,t.splice(e,1))},animateAgain:function(){var t=this;t.startSlices();for(var e=0;e<t.chartData.length;e++){var i=t.chartData[e];i.started=!1;var s=i.wedge;s&&s.translate(i.startX,i.startY)}e=t.startDuration;0<e?(e=setTimeout(function(){t.pullSlices.call(t)},1200*e),t.timeOuts.push(e)):t.pullSlices()},measureMaxLabel:function(){var t=this.chartData,e=0,i;for(i=0;i<t.length;i++){var s=t[i],a=this.formatString(this.labelText,s),r=this.labelFunction;r&&(a=r(s,a));s=AmCharts.text(this.container,a,this.color,this.fontFamily,this.fontSize);a=s.getBBox().width;a>e&&(e=a);s.remove()}return e}});AmCharts.AmRectangularChart=AmCharts.Class({inherits:AmCharts.AmCoordinateChart,construct:function(t){AmCharts.AmRectangularChart.base.construct.call(this,t);this.theme=t;this.createEvents("zoomed");this.marginRight=this.marginBottom=this.marginTop=this.marginLeft=20;this.verticalPosition=this.horizontalPosition=this.depth3D=this.angle=0;this.heightMultiplier=this.widthMultiplier=1;this.plotAreaFillColors="#FFFFFF";this.plotAreaFillAlphas=0;this.plotAreaBorderColor="#000000";this.plotAreaBorderAlpha=0;this.zoomOutButtonImageSize=17;this.zoomOutButtonImage="lens.png";this.zoomOutText="Show all";this.zoomOutButtonColor="#e5e5e5";this.zoomOutButtonAlpha=0;this.zoomOutButtonRollOverAlpha=1;this.zoomOutButtonPadding=8;this.trendLines=[];this.autoMargins=!0;this.marginsUpdated=!1;this.autoMarginOffset=10;AmCharts.applyTheme(this,t,"AmRectangularChart")},initChart:function(){AmCharts.AmRectangularChart.base.initChart.call(this);this.updateDxy();var t=!0;!this.marginsUpdated&&this.autoMargins&&(this.resetMargins(),t=!1);this.processScrollbars();this.updateMargins();this.updatePlotArea();this.updateScrollbars();this.updateTrendLines();this.updateChartCursor();this.updateValueAxes();t&&(this.scrollbarOnly||this.updateGraphs())},drawChart:function(){AmCharts.AmRectangularChart.base.drawChart.call(this);this.drawPlotArea();if(AmCharts.ifArray(this.chartData)){var t=this.chartCursor;t&&t.draw();t=this.zoomOutText;""!==t&&t&&this.drawZoomOutButton()}},resetMargins:function(){var t={},e;if("serial"==this.type){var i=this.valueAxes;for(e=0;e<i.length;e++){var s=i[e];s.ignoreAxisWidth||(s.setOrientation(this.rotate),s.fixAxisPosition(),t[s.position]=!0)}(e=this.categoryAxis)&&!e.ignoreAxisWidth&&(e.setOrientation(!this.rotate),e.fixAxisPosition(),e.fixAxisPosition(),t[e.position]=!0)}else{s=this.xAxes;i=this.yAxes;for(e=0;e<s.length;e++){var a=s[e];a.ignoreAxisWidth||(a.setOrientation(!0),a.fixAxisPosition(),t[a.position]=!0)}for(e=0;e<i.length;e++)s=i[e],s.ignoreAxisWidth||(s.setOrientation(!1),s.fixAxisPosition(),t[s.position]=!0)}t.left&&(this.marginLeft=0);t.right&&(this.marginRight=0);t.top&&(this.marginTop=0);t.bottom&&(this.marginBottom=0);this.fixMargins=t},measureMargins:function(){var t=this.valueAxes,e,i=this.autoMarginOffset,s=this.fixMargins,a=this.realWidth,r=this.realHeight,h=i,o=i,n=a;e=r;var l;for(l=0;l<t.length;l++)e=this.getAxisBounds(t[l],h,n,o,e),h=Math.round(e.l),n=Math.round(e.r),o=Math.round(e.t),e=Math.round(e.b);if(t=this.categoryAxis)e=this.getAxisBounds(t,h,n,o,e),h=Math.round(e.l),n=Math.round(e.r),o=Math.round(e.t),e=Math.round(e.b);s.left&&h<i&&(this.marginLeft=Math.round(-h+i));s.right&&n>=a-i&&(this.marginRight=Math.round(n-a+i));s.top&&o<i+this.titleHeight&&(this.marginTop=Math.round(this.marginTop-o+i+this.titleHeight));s.bottom&&e>r-i&&(this.marginBottom=Math.round(this.marginBottom+e-r+i));this.initChart()},getAxisBounds:function(t,e,i,s,a){if(!t.ignoreAxisWidth){var r=t.labelsSet,h=t.tickLength;t.inside&&(h=0);if(r)switch(r=t.getBBox(),t.position){case"top":t=r.y;s>t&&(s=t);break;case"bottom":t=r.y+r.height;a<t&&(a=t);break;case"right":t=r.x+r.width+h+3;i<t&&(i=t);break;case"left":t=r.x-h,e>t&&(e=t)}}return{l:e,t:s,r:i,b:a}},drawZoomOutButton:function(){var t=this,e=t.container.set();t.zoomButtonSet.push(e);var i=t.color,s=t.fontSize,a=t.zoomOutButtonImageSize,r=t.zoomOutButtonImage,h=AmCharts.lang.zoomOutText||t.zoomOutText,o=t.zoomOutButtonColor,n=t.zoomOutButtonAlpha,l=t.zoomOutButtonFontSize,d=t.zoomOutButtonPadding;isNaN(l)||(s=l);(l=t.zoomOutButtonFontColor)&&(i=l);var l=t.zoomOutButton,c;l&&(l.fontSize&&(s=l.fontSize),l.color&&(i=l.color),l.backgroundColor&&(o=l.backgroundColor),isNaN(l.backgroundAlpha)||(t.zoomOutButtonRollOverAlpha=l.backgroundAlpha));var u=l=0;void 0!==t.pathToImages&&r&&(c=t.container.image(t.pathToImages+r,0,0,a,a),AmCharts.setCN(t,c,"zoom-out-image"),e.push(c),c=c.getBBox(),l=c.width+5);void 0!==h&&(i=AmCharts.text(t.container,h,i,t.fontFamily,s,"start"),AmCharts.setCN(t,i,"zoom-out-label"),s=i.getBBox(),u=c?c.height/2-3:s.height/2,i.translate(l,u),e.push(i));c=e.getBBox();i=1;AmCharts.isModern||(i=0);o=AmCharts.rect(t.container,c.width+2*d+5,c.height+2*d-2,o,1,1,o,i);o.setAttr("opacity",n);o.translate(-d,-d);AmCharts.setCN(t,o,"zoom-out-bg");e.push(o);o.toBack();t.zbBG=o;c=o.getBBox();e.translate(t.marginLeftReal+t.plotAreaWidth-c.width+d,t.marginTopReal+d);e.hide();e.mouseover(function(){t.rollOverZB()}).mouseout(function(){t.rollOutZB()}).click(function(){t.clickZB()}).touchstart(function(){t.rollOverZB()}).touchend(function(){t.rollOutZB();t.clickZB()});for(n=0;n<e.length;n++)e[n].attr({cursor:"pointer"});t.zbSet=e},rollOverZB:function(){this.zbBG.setAttr("opacity",this.zoomOutButtonRollOverAlpha)},rollOutZB:function(){this.zbBG.setAttr("opacity",this.zoomOutButtonAlpha)},clickZB:function(){this.zoomOut()},zoomOut:function(){this.updateScrollbar=!0;this.zoom()},drawPlotArea:function(){var t=this.dx,e=this.dy,i=this.marginLeftReal,s=this.marginTopReal,a=this.plotAreaWidth-1,r=this.plotAreaHeight-1,h=this.plotAreaFillColors,o=this.plotAreaFillAlphas,n=this.plotAreaBorderColor,l=this.plotAreaBorderAlpha;this.trendLinesSet.clipRect(i,s,a,r);"object"==typeof o&&(o=o[0]);h=AmCharts.polygon(this.container,[0,a,a,0,0],[0,0,r,r,0],h,o,1,n,l,this.plotAreaGradientAngle);AmCharts.setCN(this,h,"plot-area");h.translate(i+t,s+e);this.set.push(h);0!==t&&0!==e&&(h=this.plotAreaFillColors,"object"==typeof h&&(h=h[0]),h=AmCharts.adjustLuminosity(h,-.15),a=AmCharts.polygon(this.container,[0,t,a+t,a,0],[0,e,e,0,0],h,o,1,n,l),AmCharts.setCN(this,a,"plot-area-bottom"),a.translate(i,s+r),this.set.push(a),t=AmCharts.polygon(this.container,[0,0,t,t,0],[0,r,r+e,e,0],h,o,1,n,l),AmCharts.setCN(this,t,"plot-area-left"),t.translate(i,s),this.set.push(t));(i=this.bbset)&&this.scrollbarOnly&&i.remove()},updatePlotArea:function(){var t=this.updateWidth(),e=this.updateHeight(),i=this.container;this.realWidth=t;this.realWidth=e;i&&this.container.setSize(t,e);t=t-this.marginLeftReal-this.marginRightReal-this.dx;e=e-this.marginTopReal-this.marginBottomReal;1>t&&(t=1);1>e&&(e=1);this.plotAreaWidth=Math.round(t);this.plotAreaHeight=Math.round(e)},updateDxy:function(){this.dx=Math.round(this.depth3D*Math.cos(this.angle*Math.PI/180));this.dy=Math.round(-this.depth3D*Math.sin(this.angle*Math.PI/180));this.d3x=Math.round(this.columnSpacing3D*Math.cos(this.angle*Math.PI/180));this.d3y=Math.round(-this.columnSpacing3D*Math.sin(this.angle*Math.PI/180))},updateMargins:function(){var t=this.getTitleHeight();this.titleHeight=t;this.marginTopReal=this.marginTop-this.dy+t;this.marginBottomReal=this.marginBottom;this.marginLeftReal=this.marginLeft;this.marginRightReal=this.marginRight},updateValueAxes:function(){var t=this.valueAxes,e=this.marginLeftReal,i=this.marginTopReal,s=this.plotAreaHeight,a=this.plotAreaWidth,r;for(r=0;r<t.length;r++){var h=t[r];h.axisRenderer=AmCharts.RecAxis;h.guideFillRenderer=AmCharts.RecFill;h.axisItemRenderer=AmCharts.RecItem;h.dx=this.dx;h.dy=this.dy;h.viW=a-1;h.viH=s-1;h.marginsChanged=!0;h.viX=e;h.viY=i;this.updateObjectSize(h)}},updateObjectSize:function(t){t.width=(this.plotAreaWidth-1)*this.widthMultiplier;t.height=(this.plotAreaHeight-1)*this.heightMultiplier;t.x=this.marginLeftReal+this.horizontalPosition;t.y=this.marginTopReal+this.verticalPosition},updateGraphs:function(){var t=this.graphs,e;for(e=0;e<t.length;e++){var i=t[e];i.x=this.marginLeftReal+this.horizontalPosition;i.y=this.marginTopReal+this.verticalPosition;i.width=this.plotAreaWidth*this.widthMultiplier;i.height=this.plotAreaHeight*this.heightMultiplier;i.index=e;i.dx=this.dx;i.dy=this.dy;i.rotate=this.rotate}},updateChartCursor:function(){var t=this.chartCursor;t&&(t=AmCharts.processObject(t,AmCharts.ChartCursor,this.theme),this.addChartCursor(t),t.x=this.marginLeftReal,t.y=this.marginTopReal,t.width=this.plotAreaWidth-1,t.height=this.plotAreaHeight-1,t.chart=this)},processScrollbars:function(){var t=this.chartScrollbar;t&&(t=AmCharts.processObject(t,AmCharts.ChartScrollbar,this.theme),this.addChartScrollbar(t))},updateScrollbars:function(){},addChartCursor:function(t){AmCharts.callMethod("destroy",[this.chartCursor]);t&&(this.listenTo(t,"changed",this.handleCursorChange),this.listenTo(t,"zoomed",this.handleCursorZoom));this.chartCursor=t},removeChartCursor:function(){AmCharts.callMethod("destroy",[this.chartCursor]);this.chartCursor=null},zoomTrendLines:function(){var t=this.trendLines,e;for(e=0;e<t.length;e++){var i=t[e];i.valueAxis.recalculateToPercents?i.set&&i.set.hide():(i.x=this.marginLeftReal+this.horizontalPosition,i.y=this.marginTopReal+this.verticalPosition,i.draw())}},addTrendLine:function(t){this.trendLines.push(t)},removeTrendLine:function(t){var e=this.trendLines,i;for(i=e.length-1;0<=i;i--)e[i]==t&&e.splice(i,1)},adjustMargins:function(t,e){var i=t.position,s=t.scrollbarHeight+t.offset;t.enabled&&("top"==i?e?this.marginLeftReal+=s:this.marginTopReal+=s:e?this.marginRightReal+=s:this.marginBottomReal+=s)},getScrollbarPosition:function(t,e,i){t.position=e?"bottom"==i||"left"==i?"bottom":"top":"top"==i||"right"==i?"bottom":"top"},updateChartScrollbar:function(t,e){if(t){t.rotate=e;var i=this.marginTopReal,s=this.marginLeftReal,a=t.scrollbarHeight,r=this.dx,h=this.dy,o=t.offset;"top"==t.position?e?(t.y=i,t.x=s-a-o):(t.y=i-a+h-1-o,t.x=s+r):e?(t.y=i+h,t.x=s+this.plotAreaWidth+r+o):(t.y=i+this.plotAreaHeight+o,t.x=this.marginLeftReal)}},showZB:function(t){var e=this.zbSet;e&&(t?e.show():e.hide(),this.rollOutZB())},handleReleaseOutside:function(t){AmCharts.AmRectangularChart.base.handleReleaseOutside.call(this,t);(t=this.chartCursor)&&t.handleReleaseOutside&&t.handleReleaseOutside()},handleMouseDown:function(t){AmCharts.AmRectangularChart.base.handleMouseDown.call(this,t);var e=this.chartCursor;e&&e.handleMouseDown(t)},handleCursorChange:function(t){}});AmCharts.TrendLine=AmCharts.Class({construct:function(t){this.cname="TrendLine";this.createEvents("click");this.isProtected=!1;this.dashLength=0;this.lineColor="#00CC00";this.lineThickness=this.lineAlpha=1;AmCharts.applyTheme(this,t,this.cname)},draw:function(){var t=this;t.destroy();var e=t.chart,i=e.container,s,a,r,h,o=t.categoryAxis,n=t.initialDate,l=t.initialCategory,d=t.finalDate,c=t.finalCategory,u=t.valueAxis,m=t.valueAxisX,p=t.initialXValue,f=t.finalXValue,g=t.initialValue,v=t.finalValue,C=u.recalculateToPercents,A=e.dataDateFormat;o&&(n&&(n instanceof Date||(n=A?AmCharts.stringToDate(n,A):new Date(n)),t.initialDate=n,s=o.dateToCoordinate(n)),l&&(s=o.categoryToCoordinate(l)),d&&(d instanceof Date||(d=A?AmCharts.stringToDate(d,A):new Date(d)),t.finalDate=d,a=o.dateToCoordinate(d)),c&&(a=o.categoryToCoordinate(c)));m&&!C&&(isNaN(p)||(s=m.getCoordinate(p)),isNaN(f)||(a=m.getCoordinate(f)));u&&!C&&(isNaN(g)||(r=u.getCoordinate(g)),isNaN(v)||(h=u.getCoordinate(v)));isNaN(s)||isNaN(a)||isNaN(r)||isNaN(r)||(e.rotate?(o=[r,h],a=[s,a]):(o=[s,a],a=[r,h]),r=t.lineColor,s=AmCharts.line(i,o,a,r,t.lineAlpha,t.lineThickness,t.dashLength),h=o,n=a,c=o[1]-o[0],u=a[1]-a[0],0===c&&(c=.01),0===u&&(u=.01),l=c/Math.abs(c),d=u/Math.abs(u),u=c*u/Math.abs(c*u)*Math.sqrt(Math.pow(c,2)+Math.pow(u,2)),c=Math.asin(c/u),u=90*Math.PI/180-c,c=Math.abs(5*Math.cos(u)),u=Math.abs(5*Math.sin(u)),h.push(o[1]-l*u,o[0]-l*u),n.push(a[1]+d*c,a[0]+d*c),o=AmCharts.polygon(i,h,n,r,.005,0),i=i.set([o,s]),i.translate(e.marginLeftReal,e.marginTopReal),e.trendLinesSet.push(i),AmCharts.setCN(e,s,"trend-line"),AmCharts.setCN(e,s,"trend-line-"+t.id),t.line=s,t.set=i,o.mouseup(function(){t.handleLineClick()}).mouseover(function(){t.handleLineOver()}).mouseout(function(){t.handleLineOut()}),o.touchend&&o.touchend(function(){t.handleLineClick()}))},handleLineClick:function(){var t={type:"click",trendLine:this,chart:this.chart};this.fire(t.type,t)},handleLineOver:function(){var t=this.rollOverColor;void 0!==t&&this.line.attr({stroke:t})},handleLineOut:function(){this.line.attr({stroke:this.lineColor})},destroy:function(){AmCharts.remove(this.set)}});AmCharts.circle=function(t,e,i,s,a,r,h,o,n){if(void 0==a||0===a)a=.01;void 0===r&&(r="#000000");void 0===h&&(h=0);s={fill:i,stroke:r,"fill-opacity":s,"stroke-width":a,"stroke-opacity":h};t=isNaN(n)?t.circle(0,0,e).attr(s):t.ellipse(0,0,e,n).attr(s);o&&t.gradient("radialGradient",[i,AmCharts.adjustLuminosity(i,-.6)]);return t};AmCharts.text=function(t,e,i,s,a,r,h,o){r||(r="middle");"right"==r&&(r="end");"left"==r&&(r="start");isNaN(o)&&(o=1);void 0!==e&&(e=String(e),AmCharts.isIE&&!AmCharts.isModern&&(e=e.replace("&amp;","&"),e=e.replace("&","&amp;")));i={fill:i,"font-family":s,"font-size":a,opacity:o};!0===h&&(i["font-weight"]="bold");i["text-anchor"]=r;return t.text(e,i)};AmCharts.polygon=function(t,e,i,s,a,r,h,o,n,l,d){isNaN(r)&&(r=.01);isNaN(o)&&(o=a);var c=s,u=!1;"object"==typeof c&&1<c.length&&(u=!0,c=c[0]);void 0===h&&(h=c);a={fill:c,stroke:h,"fill-opacity":a,"stroke-width":r,"stroke-opacity":o};void 0!==d&&0<d&&(a["stroke-dasharray"]=d);d=AmCharts.dx;r=AmCharts.dy;t.handDrawn&&(i=AmCharts.makeHD(e,i,t.handDrawScatter),e=i[0],i=i[1]);h=Math.round;l&&(h=AmCharts.doNothing);l="M"+(h(e[0])+d)+","+(h(i[0])+r);for(o=1;o<e.length;o++)l+=" L"+(h(e[o])+d)+","+(h(i[o])+r);t=t.path(l+" Z").attr(a);u&&t.gradient("linearGradient",s,n);return t};AmCharts.rect=function(t,e,i,s,a,r,h,o,n,l,d){isNaN(r)&&(r=0);void 0===n&&(n=0);void 0===l&&(l=270);isNaN(a)&&(a=0);var c=s,u=!1;"object"==typeof c&&(c=c[0],u=!0);void 0===h&&(h=c);void 0===o&&(o=a);e=Math.round(e);i=Math.round(i);var m=0,p=0;

0>e&&(e=Math.abs(e),m=-e);0>i&&(i=Math.abs(i),p=-i);m+=AmCharts.dx;p+=AmCharts.dy;a={fill:c,stroke:h,"fill-opacity":a,"stroke-opacity":o};void 0!==d&&0<d&&(a["stroke-dasharray"]=d);t=t.rect(m,p,e,i,n,r).attr(a);u&&t.gradient("linearGradient",s,l);return t};AmCharts.bullet=function(t,e,i,s,a,r,h,o,n,l,d){var c;"circle"==e&&(e="round");switch(e){case"round":c=AmCharts.circle(t,i/2,s,a,r,h,o);break;case"square":c=AmCharts.polygon(t,[-i/2,i/2,i/2,-i/2],[i/2,i/2,-i/2,-i/2],s,a,r,h,o,l-180);break;case"rectangle":c=AmCharts.polygon(t,[-i,i,i,-i],[i/2,i/2,-i/2,-i/2],s,a,r,h,o,l-180);break;case"diamond":c=AmCharts.polygon(t,[-i/2,0,i/2,0],[0,-i/2,0,i/2],s,a,r,h,o);break;case"triangleUp":c=AmCharts.triangle(t,i,0,s,a,r,h,o);break;case"triangleDown":c=AmCharts.triangle(t,i,180,s,a,r,h,o);break;case"triangleLeft":c=AmCharts.triangle(t,i,270,s,a,r,h,o);break;case"triangleRight":c=AmCharts.triangle(t,i,90,s,a,r,h,o);break;case"bubble":c=AmCharts.circle(t,i/2,s,a,r,h,o,!0);break;case"line":c=AmCharts.line(t,[-i/2,i/2],[0,0],s,a,r,h,o);break;case"yError":c=t.set();c.push(AmCharts.line(t,[0,0],[-i/2,i/2],s,a,r));c.push(AmCharts.line(t,[-n,n],[-i/2,-i/2],s,a,r));c.push(AmCharts.line(t,[-n,n],[i/2,i/2],s,a,r));break;case"xError":c=t.set(),c.push(AmCharts.line(t,[-i/2,i/2],[0,0],s,a,r)),c.push(AmCharts.line(t,[-i/2,-i/2],[-n,n],s,a,r)),c.push(AmCharts.line(t,[i/2,i/2],[-n,n],s,a,r))}c&&c.pattern(d);return c};AmCharts.triangle=function(t,e,i,s,a,r,h,o){if(void 0===r||0===r)r=1;void 0===h&&(h="#000");void 0===o&&(o=0);s={fill:s,stroke:h,"fill-opacity":a,"stroke-width":r,"stroke-opacity":o};e/=2;var n;0===i&&(n=" M"+-e+","+e+" L0,"+-e+" L"+e+","+e+" Z");180==i&&(n=" M"+-e+","+-e+" L0,"+e+" L"+e+","+-e+" Z");90==i&&(n=" M"+-e+","+-e+" L"+e+",0 L"+-e+","+e+" Z");270==i&&(n=" M"+-e+",0 L"+e+","+e+" L"+e+","+-e+" Z");return t.path(n).attr(s)};AmCharts.line=function(t,e,i,s,a,r,h,o,n,l,d){if(t.handDrawn&&!d)return AmCharts.handDrawnLine(t,e,i,s,a,r,h,o,n,l,d);r={fill:"none","stroke-width":r};void 0!==h&&0<h&&(r["stroke-dasharray"]=h);isNaN(a)||(r["stroke-opacity"]=a);s&&(r.stroke=s);s=Math.round;l&&(s=AmCharts.doNothing);l=AmCharts.dx;a=AmCharts.dy;h="M"+(s(e[0])+l)+","+(s(i[0])+a);for(o=1;o<e.length;o++)h+=" L"+(s(e[o])+l)+","+(s(i[o])+a);if(AmCharts.VML)return t.path(h,void 0,!0).attr(r);n&&(h+=" M0,0 L0,0");return t.path(h).attr(r)};AmCharts.makeHD=function(t,e,i){for(var s=[],a=[],r=1;r<t.length;r++)for(var h=Number(t[r-1]),o=Number(e[r-1]),n=Number(t[r]),l=Number(e[r]),d=Math.sqrt(Math.pow(n-h,2)+Math.pow(l-o,2)),d=Math.round(d/50)+1,n=(n-h)/d,l=(l-o)/d,c=0;c<=d;c++){var u=h+c*n+Math.random()*i,m=o+c*l+Math.random()*i;s.push(u);a.push(m)}return[s,a]};AmCharts.handDrawnLine=function(t,e,i,s,a,r,h,o,n,l,d){var c=t.set();for(d=1;d<e.length;d++)for(var u=[e[d-1],e[d]],m=[i[d-1],i[d]],m=AmCharts.makeHD(u,m,t.handDrawScatter),u=m[0],m=m[1],p=1;p<u.length;p++)c.push(AmCharts.line(t,[u[p-1],u[p]],[m[p-1],m[p]],s,a,r+Math.random()*t.handDrawThickness-t.handDrawThickness/2,h,o,n,l,!0));return c};AmCharts.doNothing=function(t){return t};AmCharts.wedge=function(t,e,i,s,a,r,h,o,n,l,d,c){var u=Math.round;r=u(r);h=u(h);o=u(o);var m=u(h/r*o),p=AmCharts.VML,f=359.5+r/100;359.94<f&&(f=359.94);a>=f&&(a=f);var g=1/180*Math.PI,f=e+Math.sin(s*g)*o,v=i-Math.cos(s*g)*m,C=e+Math.sin(s*g)*r,A=i-Math.cos(s*g)*h,b=e+Math.sin((s+a)*g)*r,x=i-Math.cos((s+a)*g)*h,N=e+Math.sin((s+a)*g)*o,g=i-Math.cos((s+a)*g)*m,y={fill:AmCharts.adjustLuminosity(l.fill,-.2),"stroke-opacity":0,"fill-opacity":l["fill-opacity"]},w=0;180<Math.abs(a)&&(w=1);s=t.set();var M;p&&(f=u(10*f),C=u(10*C),b=u(10*b),N=u(10*N),v=u(10*v),A=u(10*A),x=u(10*x),g=u(10*g),e=u(10*e),n=u(10*n),i=u(10*i),r*=10,h*=10,o*=10,m*=10,1>Math.abs(a)&&1>=Math.abs(b-C)&&1>=Math.abs(x-A)&&(M=!0));a="";var S;c&&(y["fill-opacity"]=0,y["stroke-opacity"]=l["stroke-opacity"]/2,y.stroke=l.stroke);0<n&&(S=" M"+f+","+(v+n)+" L"+C+","+(A+n),p?(M||(S+=" A"+(e-r)+","+(n+i-h)+","+(e+r)+","+(n+i+h)+","+C+","+(A+n)+","+b+","+(x+n)),S+=" L"+N+","+(g+n),0<o&&(M||(S+=" B"+(e-o)+","+(n+i-m)+","+(e+o)+","+(n+i+m)+","+N+","+(n+g)+","+f+","+(n+v)))):(S+=" A"+r+","+h+",0,"+w+",1,"+b+","+(x+n)+" L"+N+","+(g+n),0<o&&(S+=" A"+o+","+m+",0,"+w+",0,"+f+","+(v+n))),S=t.path(S+" Z",void 0,void 0,"1000,1000").attr(y),s.push(S),S=t.path(" M"+f+","+v+" L"+f+","+(v+n)+" L"+C+","+(A+n)+" L"+C+","+A+" L"+f+","+v+" Z",void 0,void 0,"1000,1000").attr(y),n=t.path(" M"+b+","+x+" L"+b+","+(x+n)+" L"+N+","+(g+n)+" L"+N+","+g+" L"+b+","+x+" Z",void 0,void 0,"1000,1000").attr(y),s.push(S),s.push(n));p?(M||(a=" A"+u(e-r)+","+u(i-h)+","+u(e+r)+","+u(i+h)+","+u(C)+","+u(A)+","+u(b)+","+u(x)),r=" M"+u(f)+","+u(v)+" L"+u(C)+","+u(A)+a+" L"+u(N)+","+u(g)):r=" M"+f+","+v+" L"+C+","+A+(" A"+r+","+h+",0,"+w+",1,"+b+","+x)+" L"+N+","+g;0<o&&(p?M||(r+=" B"+(e-o)+","+(i-m)+","+(e+o)+","+(i+m)+","+N+","+g+","+f+","+v):r+=" A"+o+","+m+",0,"+w+",0,"+f+","+v);t.handDrawn&&(e=AmCharts.line(t,[f,C],[v,A],l.stroke,l.thickness*Math.random()*t.handDrawThickness,l["stroke-opacity"]),s.push(e));t=t.path(r+" Z",void 0,void 0,"1000,1000").attr(l);if(d){e=[];for(i=0;i<d.length;i++)e.push(AmCharts.adjustLuminosity(l.fill,d[i]));0<e.length&&t.gradient("linearGradient",e)}t.pattern(c);s.wedge=t;s.push(t);return s};AmCharts.adjustLuminosity=function(t,e){t=String(t).replace(/[^0-9a-f]/gi,"");6>t.length&&(t=String(t[0])+String(t[0])+String(t[1])+String(t[1])+String(t[2])+String(t[2]));e=e||0;var i="#",s,a;for(a=0;3>a;a++)s=parseInt(t.substr(2*a,2),16),s=Math.round(Math.min(Math.max(0,s+s*e),255)).toString(16),i+=("00"+s).substr(s.length);return i};AmCharts.Bezier=AmCharts.Class({construct:function(t,e,i,s,a,r,h,o,n,l){"object"==typeof h&&(h=h[0]);"object"==typeof o&&(o=o[0]);0==o&&(h="none");r={fill:h,"fill-opacity":o,"stroke-width":r};void 0!==n&&0<n&&(r["stroke-dasharray"]=n);isNaN(a)||(r["stroke-opacity"]=a);s&&(r.stroke=s);s="M"+Math.round(e[0])+","+Math.round(i[0]);a=[];for(n=0;n<e.length;n++)a.push({x:Number(e[n]),y:Number(i[n])});1<a.length&&(e=this.interpolate(a),s+=this.drawBeziers(e));l?s+=l:AmCharts.VML||(s+="M0,0 L0,0");this.path=t.path(s).attr(r);this.node=this.path.node},interpolate:function(t){var e=[];e.push({x:t[0].x,y:t[0].y});var i=t[1].x-t[0].x,s=t[1].y-t[0].y,a=AmCharts.bezierX,r=AmCharts.bezierY;e.push({x:t[0].x+i/a,y:t[0].y+s/r});var h;for(h=1;h<t.length-1;h++){var o=t[h-1],n=t[h],s=t[h+1];isNaN(s.x)&&(s=n);isNaN(n.x)&&(n=o);isNaN(o.x)&&(o=n);i=s.x-n.x;s=s.y-o.y;o=n.x-o.x;o>i&&(o=i);e.push({x:n.x-o/a,y:n.y-s/r});e.push({x:n.x,y:n.y});e.push({x:n.x+o/a,y:n.y+s/r})}s=t[t.length-1].y-t[t.length-2].y;i=t[t.length-1].x-t[t.length-2].x;e.push({x:t[t.length-1].x-i/a,y:t[t.length-1].y-s/r});e.push({x:t[t.length-1].x,y:t[t.length-1].y});return e},drawBeziers:function(t){var e="",i;for(i=0;i<(t.length-1)/3;i++)e+=this.drawBezierMidpoint(t[3*i],t[3*i+1],t[3*i+2],t[3*i+3]);return e},drawBezierMidpoint:function(t,e,i,s){var a=Math.round,r=this.getPointOnSegment(t,e,.75),h=this.getPointOnSegment(s,i,.75),o=(s.x-t.x)/16,n=(s.y-t.y)/16,l=this.getPointOnSegment(t,e,.375);t=this.getPointOnSegment(r,h,.375);t.x-=o;t.y-=n;e=this.getPointOnSegment(h,r,.375);e.x+=o;e.y+=n;i=this.getPointOnSegment(s,i,.375);o=this.getMiddle(l,t);r=this.getMiddle(r,h);h=this.getMiddle(e,i);l=" Q"+a(l.x)+","+a(l.y)+","+a(o.x)+","+a(o.y);l+=" Q"+a(t.x)+","+a(t.y)+","+a(r.x)+","+a(r.y);l+=" Q"+a(e.x)+","+a(e.y)+","+a(h.x)+","+a(h.y);return l+=" Q"+a(i.x)+","+a(i.y)+","+a(s.x)+","+a(s.y)},getMiddle:function(t,e){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}},getPointOnSegment:function(t,e,i){return{x:t.x+(e.x-t.x)*i,y:t.y+(e.y-t.y)*i}}});AmCharts.AmDraw=AmCharts.Class({construct:function(t,e,i,s){AmCharts.SVG_NS="http://www.w3.org/2000/svg";AmCharts.SVG_XLINK="http://www.w3.org/1999/xlink";AmCharts.hasSVG=!!document.createElementNS&&!!document.createElementNS(AmCharts.SVG_NS,"svg").createSVGRect;1>e&&(e=10);1>i&&(i=10);this.div=t;this.width=e;this.height=i;this.rBin=document.createElement("div");AmCharts.hasSVG?(AmCharts.SVG=!0,e=this.createSvgElement("svg"),t.appendChild(e),this.container=e,this.addDefs(s),this.R=new AmCharts.SVGRenderer(this)):AmCharts.isIE&&AmCharts.VMLRenderer&&(AmCharts.VML=!0,AmCharts.vmlStyleSheet||(document.namespaces.add("amvml","urn:schemas-microsoft-com:vml"),31>document.styleSheets.length?(e=document.createStyleSheet(),e.addRule(".amvml","behavior:url(#default#VML); display:inline-block; antialias:true"),AmCharts.vmlStyleSheet=e):document.styleSheets[0].addRule(".amvml","behavior:url(#default#VML); display:inline-block; antialias:true")),this.container=t,this.R=new AmCharts.VMLRenderer(this,s),this.R.disableSelection(t))},createSvgElement:function(t){return document.createElementNS(AmCharts.SVG_NS,t)},circle:function(t,e,i,s){var a=new AmCharts.AmDObject("circle",this);a.attr({r:i,cx:t,cy:e});this.addToContainer(a.node,s);return a},ellipse:function(t,e,i,s,a){var r=new AmCharts.AmDObject("ellipse",this);r.attr({rx:i,ry:s,cx:t,cy:e});this.addToContainer(r.node,a);return r},setSize:function(t,e){0<t&&0<e&&(this.container.style.width=t+"px",this.container.style.height=e+"px")},rect:function(t,e,i,s,a,r,h){var o=new AmCharts.AmDObject("rect",this);AmCharts.VML&&(a=Math.round(100*a/Math.min(i,s)),i+=2*r,s+=2*r,o.bw=r,o.node.style.marginLeft=-r,o.node.style.marginTop=-r);1>i&&(i=1);1>s&&(s=1);o.attr({x:t,y:e,width:i,height:s,rx:a,ry:a,"stroke-width":r});this.addToContainer(o.node,h);return o},image:function(t,e,i,s,a,r){var h=new AmCharts.AmDObject("image",this);h.attr({x:e,y:i,width:s,height:a});this.R.path(h,t);this.addToContainer(h.node,r);return h},addToContainer:function(t,e){e||(e=this.container);e.appendChild(t)},text:function(t,e,i){return this.R.text(t,e,i)},path:function(t,e,i,s){var a=new AmCharts.AmDObject("path",this);s||(s="100,100");a.attr({cs:s});i?a.attr({dd:t}):a.attr({d:t});this.addToContainer(a.node,e);return a},set:function(t){return this.R.set(t)},remove:function(t){if(t){var e=this.rBin;e.appendChild(t);e.innerHTML=""}},renderFix:function(){var t=this.container,e=t.style,i;try{i=t.getScreenCTM()||t.createSVGMatrix()}catch(s){i=t.createSVGMatrix()}t=1-i.e%1;i=1-i.f%1;.5<t&&--t;.5<i&&--i;t&&(e.left=t+"px");i&&(e.top=i+"px")},update:function(){this.R.update()},addDefs:function(t){if(AmCharts.hasSVG){var e=this.createSvgElement("desc"),i=this.container;i.setAttribute("version","1.1");i.style.position="absolute";this.setSize(this.width,this.height);AmCharts.rtl&&(i.setAttribute("direction","rtl"),i.style.left="auto",i.style.right="0px");e.appendChild(document.createTextNode("JavaScript chart by amCharts "+t.version));i.appendChild(e);t.defs&&(e=this.createSvgElement("defs"),i.appendChild(e),AmCharts.parseDefs(t.defs,e),this.defs=e)}}});AmCharts.AmDObject=AmCharts.Class({construct:function(t,e){this.D=e;this.R=e.R;this.node=this.R.create(this,t);this.y=this.x=0;this.scale=1},attr:function(t){this.R.attr(this,t);return this},getAttr:function(t){return this.node.getAttribute(t)},setAttr:function(t,e){this.R.setAttr(this,t,e);return this},clipRect:function(t,e,i,s){this.R.clipRect(this,t,e,i,s)},translate:function(t,e,i,s){s||(t=Math.round(t),e=Math.round(e));this.R.move(this,t,e,i);this.x=t;this.y=e;this.scale=i;this.angle&&this.rotate(this.angle)},rotate:function(t,e){this.R.rotate(this,t,e);this.angle=t},animate:function(t,e,i){for(var s in t)if(t.hasOwnProperty(s)){var a=s,r=t[s];i=AmCharts.getEffect(i);this.R.animate(this,a,r,e,i)}},push:function(t){if(t){var e=this.node;e.appendChild(t.node);var i=t.clipPath;i&&e.appendChild(i);(t=t.grad)&&e.appendChild(t)}},text:function(t){this.R.setText(this,t)},remove:function(){this.R.remove(this)},clear:function(){var t=this.node;if(t.hasChildNodes())for(;1<=t.childNodes.length;)t.removeChild(t.firstChild)},hide:function(){this.setAttr("visibility","hidden")},show:function(){this.setAttr("visibility","visible")},getBBox:function(){return this.R.getBBox(this)},toFront:function(){var t=this.node;if(t){this.prevNextNode=t.nextSibling;var e=t.parentNode;e&&e.appendChild(t)}},toPrevious:function(){var t=this.node;t&&this.prevNextNode&&(t=t.parentNode)&&t.insertBefore(this.prevNextNode,null)},toBack:function(){var t=this.node;if(t){this.prevNextNode=t.nextSibling;var e=t.parentNode;if(e){var i=e.firstChild;i&&e.insertBefore(t,i)}}},mouseover:function(t){this.R.addListener(this,"mouseover",t);return this},mouseout:function(t){this.R.addListener(this,"mouseout",t);return this},click:function(t){this.R.addListener(this,"click",t);return this},dblclick:function(t){this.R.addListener(this,"dblclick",t);return this},mousedown:function(t){this.R.addListener(this,"mousedown",t);return this},mouseup:function(t){this.R.addListener(this,"mouseup",t);return this},touchstart:function(t){this.R.addListener(this,"touchstart",t);return this},touchend:function(t){this.R.addListener(this,"touchend",t);return this},contextmenu:function(t){this.node.addEventListener?this.node.addEventListener("contextmenu",t,!0):this.R.addListener(this,"contextmenu",t);return this},stop:function(t){AmCharts.removeFromArray(this.R.animations,this.an_x);AmCharts.removeFromArray(this.R.animations,this.an_y)},length:function(){return this.node.childNodes.length},gradient:function(t,e,i){this.R.gradient(this,t,e,i)},pattern:function(t,e){t&&this.R.pattern(this,t,e)}});AmCharts.VMLRenderer=AmCharts.Class({construct:function(t,e){this.chart=e;this.D=t;this.cNames={circle:"oval",ellipse:"oval",rect:"roundrect",path:"shape"};this.styleMap={x:"left",y:"top",width:"width",height:"height","font-family":"fontFamily","font-size":"fontSize",visibility:"visibility"}},create:function(t,e){var i;if("group"==e)i=document.createElement("div"),t.type="div";else if("text"==e)i=document.createElement("div"),t.type="text";else if("image"==e)i=document.createElement("img"),t.type="image";else{t.type="shape";t.shapeType=this.cNames[e];i=document.createElement("amvml:"+this.cNames[e]);var s=document.createElement("amvml:stroke");i.appendChild(s);t.stroke=s;var a=document.createElement("amvml:fill");i.appendChild(a);t.fill=a;a.className="amvml";s.className="amvml";i.className="amvml"}i.style.position="absolute";i.style.top=0;i.style.left=0;return i},path:function(t,e){t.node.setAttribute("src",e)},setAttr:function(t,e,i){if(void 0!==i){var s;8===document.documentMode&&(s=!0);var a=t.node,r=t.type,h=a.style;"r"==e&&(h.width=2*i,h.height=2*i);"oval"==t.shapeType&&("rx"==e&&(h.width=2*i),"ry"==e&&(h.height=2*i));"roundrect"==t.shapeType&&("width"!=e&&"height"!=e||--i);"cursor"==e&&(h.cursor=i);"cx"==e&&(h.left=i-AmCharts.removePx(h.width)/2);"cy"==e&&(h.top=i-AmCharts.removePx(h.height)/2);var o=this.styleMap[e];void 0!==o&&(h[o]=i);"text"==r&&("text-anchor"==e&&(t.anchor=i,o=a.clientWidth,"end"==i&&(h.marginLeft=-o+"px"),"middle"==i&&(h.marginLeft=-(o/2)+"px",h.textAlign="center"),"start"==i&&(h.marginLeft="0px")),"fill"==e&&(h.color=i),"font-weight"==e&&(h.fontWeight=i));if(h=t.children)for(o=0;o<h.length;o++)h[o].setAttr(e,i);if("shape"==r){"cs"==e&&(a.style.width="100px",a.style.height="100px",a.setAttribute("coordsize",i));"d"==e&&a.setAttribute("path",this.svgPathToVml(i));"dd"==e&&a.setAttribute("path",i);r=t.stroke;t=t.fill;"stroke"==e&&(s?r.color=i:r.setAttribute("color",i));"stroke-width"==e&&(s?r.weight=i:r.setAttribute("weight",i));"stroke-opacity"==e&&(s?r.opacity=i:r.setAttribute("opacity",i));"stroke-dasharray"==e&&(h="solid",0<i&&3>i&&(h="dot"),3<=i&&6>=i&&(h="dash"),6<i&&(h="longdash"),s?r.dashstyle=h:r.setAttribute("dashstyle",h));if("fill-opacity"==e||"opacity"==e)0===i?s?t.on=!1:t.setAttribute("on",!1):s?t.opacity=i:t.setAttribute("opacity",i);"fill"==e&&(s?t.color=i:t.setAttribute("color",i));"rx"==e&&(s?a.arcSize=i+"%":a.setAttribute("arcsize",i+"%"))}}},attr:function(t,e){for(var i in e)e.hasOwnProperty(i)&&this.setAttr(t,i,e[i])},text:function(t,e,i){var s=new AmCharts.AmDObject("text",this.D),a=s.node;a.style.whiteSpace="pre";a.innerHTML=t;this.D.addToContainer(a,i);this.attr(s,e);return s},getBBox:function(t){return this.getBox(t.node)},getBox:function(t){var e=t.offsetLeft,i=t.offsetTop,s=t.offsetWidth,a=t.offsetHeight,r;if(t.hasChildNodes()){var h,o,n;for(n=0;n<t.childNodes.length;n++){r=this.getBox(t.childNodes[n]);var l=r.x;isNaN(l)||(isNaN(h)?h=l:l<h&&(h=l));var d=r.y;isNaN(d)||(isNaN(o)?o=d:d<o&&(o=d));l=r.width+l;isNaN(l)||(s=Math.max(s,l));r=r.height+d;isNaN(r)||(a=Math.max(a,r))}0>h&&(e+=h);0>o&&(i+=o)}return{x:e,y:i,width:s,height:a}},setText:function(t,e){var i=t.node;i&&(i.innerHTML=e);this.setAttr(t,"text-anchor",t.anchor)},addListener:function(t,e,i){t.node["on"+e]=i},move:function(t,e,i){var s=t.node,a=s.style;"text"==t.type&&(i-=AmCharts.removePx(a.fontSize)/2-1);"oval"==t.shapeType&&(e-=AmCharts.removePx(a.width)/2,i-=AmCharts.removePx(a.height)/2);t=t.bw;isNaN(t)||(e-=t,i-=t);isNaN(e)||isNaN(i)||(s.style.left=e+"px",s.style.top=i+"px")},svgPathToVml:function(t){var e=t.split(" ");t="";var i,s=Math.round,a;for(a=0;a<e.length;a++){var r=e[a],h=r.substring(0,1),r=r.substring(1),o=r.split(","),n=s(o[0])+","+s(o[1]);"M"==h&&(t+=" m "+n);"L"==h&&(t+=" l "+n);"Z"==h&&(t+=" x e");if("Q"==h){var l=i.length,d=i[l-1],c=o[0],u=o[1],n=o[2],m=o[3];i=s(i[l-2]/3+2/3*c);d=s(d/3+2/3*u);c=s(2/3*c+n/3);u=s(2/3*u+m/3);t+=" c "+i+","+d+","+c+","+u+","+n+","+m}"A"==h&&(t+=" wa "+r);"B"==h&&(t+=" at "+r);i=o}return t},animate:function(t,e,i,s,a){var r=t.node,h=this.chart;if("translate"==e){e=i.split(",");i=e[1];var o=r.offsetTop;h.animate(t,"left",r.offsetLeft,e[0],s,a,"px");h.animate(t,"top",o,i,s,a,"px")}},clipRect:function(t,e,i,s,a){t=t.node;0===e&&0===i?(t.style.width=s+"px",t.style.height=a+"px",t.style.overflow="hidden"):t.style.clip="rect("+i+"px "+(e+s)+"px "+(i+a)+"px "+e+"px)"},rotate:function(t,e,i){if(0!==Number(e)){var s=t.node;t=s.style;i||(i=this.getBGColor(s.parentNode));t.backgroundColor=i;t.paddingLeft=1;i=e*Math.PI/180;var a=Math.cos(i),r=Math.sin(i),h=AmCharts.removePx(t.left),o=AmCharts.removePx(t.top),n=s.offsetWidth,s=s.offsetHeight;e/=Math.abs(e);t.left=h+n/2-n/2*Math.cos(i)-e*s/2*Math.sin(i)+3;t.top=o-e*n/2*Math.sin(i)+e*s/2*Math.sin(i);t.cssText=t.cssText+"; filter:progid:DXImageTransform.Microsoft.Matrix(M11='"+a+"', M12='"+-r+"', M21='"+r+"', M22='"+a+"', sizingmethod='auto expand');"}},getBGColor:function(t){var e="#FFFFFF";if(t.style){var i=t.style.backgroundColor;""!==i?e=i:t.parentNode&&(e=this.getBGColor(t.parentNode))}return e},set:function(t){var e=new AmCharts.AmDObject("group",this.D);this.D.container.appendChild(e.node);if(t){var i;for(i=0;i<t.length;i++)e.push(t[i])}return e},gradient:function(t,e,i,s){var a="";"radialGradient"==e&&(e="gradientradial",i.reverse());"linearGradient"==e&&(e="gradient");var r;for(r=0;r<i.length;r++){var h=Math.round(100*r/(i.length-1)),a=a+(h+"% "+i[r]);r<i.length-1&&(a+=",")}t=t.fill;90==s?s=0:270==s?s=180:180==s?s=90:0===s&&(s=270);8===document.documentMode?(t.type=e,t.angle=s):(t.setAttribute("type",e),t.setAttribute("angle",s));a&&(t.colors.value=a)},remove:function(t){t.clipPath&&this.D.remove(t.clipPath);this.D.remove(t.node)},disableSelection:function(t){void 0!==typeof t.onselectstart&&(t.onselectstart=function(){return!1});t.style.cursor="default"},pattern:function(t,e){var i=t.node,s=t.fill,a="none";e.color&&(a=e.color);i.fillColor=a;8===document.documentMode?(s.type="tile",s.src=e.url):(s.setAttribute("type","tile"),s.setAttribute("src",e.url))},update:function(){}});AmCharts.SVGRenderer=AmCharts.Class({construct:function(t){this.D=t;this.animations=[]},create:function(t,e){return document.createElementNS(AmCharts.SVG_NS,e)},attr:function(t,e){for(var i in e)e.hasOwnProperty(i)&&this.setAttr(t,i,e[i])},setAttr:function(t,e,i){void 0!==i&&t.node.setAttribute(e,i)},animate:function(t,e,i,s,a){var r=t.node;t["an_"+e]&&AmCharts.removeFromArray(this.animations,t["an_"+e]);"translate"==e?(r=(r=r.getAttribute("transform"))?String(r).substring(10,r.length-1):"0,0",r=r.split(", ").join(" "),r=r.split(" ").join(","),0===r&&(r="0,0")):r=Number(r.getAttribute(e));i={obj:t,frame:0,attribute:e,from:r,to:i,time:s,effect:a};this.animations.push(i);t["an_"+e]=i},update:function(){var t,e=this.animations;for(t=e.length-1;0<=t;t--){var i=e[t],s=1e3*i.time/AmCharts.updateRate,a=i.frame+1,r=i.obj,h=i.attribute,o,n,l;a<=s?(i.frame++,"translate"==h?(o=i.from.split(","),h=Number(o[0]),o=Number(o[1]),isNaN(o)&&(o=0),n=i.to.split(","),l=Number(n[0]),n=Number(n[1]),l=0===l-h?l:Math.round(AmCharts[i.effect](0,a,h,l-h,s)),i=0===n-o?n:Math.round(AmCharts[i.effect](0,a,o,n-o,s)),h="transform",i="translate("+l+","+i+")"):(n=Number(i.from),o=Number(i.to),l=o-n,i=AmCharts[i.effect](0,a,n,l,s),isNaN(i)&&(i=o),0===l&&this.animations.splice(t,1)),this.setAttr(r,h,i)):("translate"==h?(n=i.to.split(","),l=Number(n[0]),n=Number(n[1]),r.translate(l,n)):(o=Number(i.to),this.setAttr(r,h,o)),this.animations.splice(t,1))}},getBBox:function(t){if(t=t.node)try{return t.getBBox()}catch(e){}return{width:0,height:0,x:0,y:0}},path:function(t,e){t.node.setAttributeNS(AmCharts.SVG_XLINK,"xlink:href",e)},clipRect:function(t,e,i,s,a){var r=t.node,h=t.clipPath;h&&this.D.remove(h);var o=r.parentNode;o&&(r=document.createElementNS(AmCharts.SVG_NS,"clipPath"),h=AmCharts.getUniqueId(),r.setAttribute("id",h),this.D.rect(e,i,s,a,0,0,r),o.appendChild(r),e="#",AmCharts.baseHref&&!AmCharts.isIE&&(e=this.removeTarget(window.location.href)+e),this.setAttr(t,"clip-path","url("+e+h+")"),this.clipPathC++,t.clipPath=r)},text:function(t,e,i){var s=new AmCharts.AmDObject("text",this.D);t=String(t).split("\n");var a=e["font-size"],r;for(r=0;r<t.length;r++){var h=this.create(null,"tspan");h.appendChild(document.createTextNode(t[r]));h.setAttribute("y",(a+2)*r+Math.round(a/2));h.setAttribute("x",0);h.style.fontSize=a+"px";s.node.appendChild(h)}s.node.setAttribute("y",Math.round(a/2));this.attr(s,e);this.D.addToContainer(s.node,i);return s},setText:function(t,e){var i=t.node;i&&(i.removeChild(i.firstChild),i.appendChild(document.createTextNode(e)))},move:function(t,e,i,s){isNaN(e)&&(e=0);isNaN(i)&&(i=0);e="translate("+e+","+i+")";s&&(e=e+" scale("+s+")");this.setAttr(t,"transform",e)},rotate:function(t,e){var i=t.node.getAttribute("transform"),s="rotate("+e+")";i&&(s=i+" "+s);this.setAttr(t,"transform",s)},set:function(t){var e=new AmCharts.AmDObject("g",this.D);this.D.container.appendChild(e.node);if(t){var i;for(i=0;i<t.length;i++)e.push(t[i])}return e},addListener:function(t,e,i){t.node["on"+e]=i},gradient:function(t,e,i,s){var a=t.node,r=t.grad;r&&this.D.remove(r);e=document.createElementNS(AmCharts.SVG_NS,e);r=AmCharts.getUniqueId();e.setAttribute("id",r);if(!isNaN(s)){var h=0,o=0,n=0,l=0;90==s?n=100:270==s?l=100:180==s?h=100:0===s&&(o=100);e.setAttribute("x1",h+"%");e.setAttribute("x2",o+"%");e.setAttribute("y1",n+"%");e.setAttribute("y2",l+"%")}for(s=0;s<i.length;s++)h=document.createElementNS(AmCharts.SVG_NS,"stop"),o=100*s/(i.length-1),0===s&&(o=0),h.setAttribute("offset",o+"%"),h.setAttribute("stop-color",i[s]),e.appendChild(h);a.parentNode.appendChild(e);i="#";AmCharts.baseHref&&!AmCharts.isIE&&(i=this.removeTarget(window.location.href)+i);a.setAttribute("fill","url("+i+r+")");t.grad=e},removeTarget:function(t){urlArr=t.split("#");return urlArr[0]},pattern:function(t,e,i){var s=t.node;isNaN(i)&&(i=1);var a=t.patternNode;a&&this.D.remove(a);var a=document.createElementNS(AmCharts.SVG_NS,"pattern"),r=AmCharts.getUniqueId(),h=e;e.url&&(h=e.url);var o=Number(e.width);isNaN(o)&&(o=4);var n=Number(e.height);isNaN(n)&&(n=4);o/=i;n/=i;i=e.x;isNaN(i)&&(i=0);var l=-Math.random()*Number(e.randomX);isNaN(l)||(i=l);l=e.y;isNaN(l)&&(l=0);var d=-Math.random()*Number(e.randomY);isNaN(d)||(l=d);a.setAttribute("id",r);a.setAttribute("width",o);a.setAttribute("height",n);a.setAttribute("patternUnits","userSpaceOnUse");a.setAttribute("xlink:href",h);e.color&&(d=document.createElementNS(AmCharts.SVG_NS,"rect"),d.setAttributeNS(null,"height",o),d.setAttributeNS(null,"width",n),d.setAttributeNS(null,"fill",e.color),a.appendChild(d));this.D.image(h,0,0,o,n,a).translate(i,l);h="#";AmCharts.baseHref&&!AmCharts.isIE&&(h=this.removeTarget(window.location.href)+h);s.setAttribute("fill","url("+h+r+")");t.patternNode=a;s.parentNode.appendChild(a)},remove:function(t){t.clipPath&&this.D.remove(t.clipPath);t.grad&&this.D.remove(t.grad);t.patternNode&&this.D.remove(t.patternNode);this.D.remove(t.node)}});AmCharts.AmDSet=AmCharts.Class({construct:function(t){this.create("g")},attr:function(t){this.R.attr(this.node,t)},move:function(t,e){this.R.move(this.node,t,e)}});AmCharts.AmLegend=AmCharts.Class({construct:function(t){this.enabled=!0;this.cname="AmLegend";this.createEvents("rollOverMarker","rollOverItem","rollOutMarker","rollOutItem","showItem","hideItem","clickMarker","rollOverItem","rollOutItem","clickLabel");this.position="bottom";this.borderColor=this.color="#000000";this.borderAlpha=0;this.markerLabelGap=5;this.verticalGap=10;this.align="left";this.horizontalGap=0;this.spacing=10;this.markerDisabledColor="#AAB3B3";this.markerType="square";this.markerSize=16;this.markerBorderThickness=this.markerBorderAlpha=1;this.marginBottom=this.marginTop=0;this.marginLeft=this.marginRight=20;this.autoMargins=!0;this.valueWidth=50;this.switchable=!0;this.switchType="x";this.switchColor="#FFFFFF";this.rollOverColor="#CC0000";this.reversedOrder=!1;this.labelText="[[title]]";this.valueText="[[value]]";this.useMarkerColorForLabels=!1;this.rollOverGraphAlpha=1;this.textClickEnabled=!1;this.equalWidths=!0;this.dateFormat="DD-MM-YYYY";this.backgroundColor="#FFFFFF";this.backgroundAlpha=0;this.useGraphSettings=!1;this.showEntries=!0;AmCharts.applyTheme(this,t,this.cname)},setData:function(t){this.legendData=t;this.invalidateSize()},invalidateSize:function(){this.destroy();this.entries=[];this.valueLabels=[];var t=this.legendData;this.enabled&&(AmCharts.ifArray(t)||AmCharts.ifArray(this.data))&&this.drawLegend()},drawLegend:function(){var t=this.chart,e=this.position,i=this.width,s=t.divRealWidth,a=t.divRealHeight,r=this.div,h=this.legendData;this.data&&(h=this.data);isNaN(this.fontSize)&&(this.fontSize=t.fontSize);if("right"==e||"left"==e)this.maxColumns=1,this.autoMargins&&(this.marginLeft=this.marginRight=10);else if(this.autoMargins){this.marginRight=t.marginRight;this.marginLeft=t.marginLeft;var o=t.autoMarginOffset;"bottom"==e?(this.marginBottom=o,this.marginTop=0):(this.marginTop=o,this.marginBottom=0)}i=void 0!==i?AmCharts.toCoordinate(i,s):t.realWidth;"outside"==e?(i=r.offsetWidth,a=r.offsetHeight,r.clientHeight&&(i=r.clientWidth,a=r.clientHeight)):(isNaN(i)||(r.style.width=i+"px"),r.className="amChartsLegend "+t.classNamePrefix+"-legend-div");this.divWidth=i;(e=this.container)?(e.container.innerHTML="",r.appendChild(e.container),e.width=i,e.height=a,e.addDefs(t)):e=new AmCharts.AmDraw(r,i,a,t);this.container=e;this.lx=0;this.ly=8;a=this.markerSize;a>this.fontSize&&(this.ly=a/2-1);0<a&&(this.lx+=a+this.markerLabelGap);this.titleWidth=0;if(a=this.title)a=AmCharts.text(this.container,a,this.color,t.fontFamily,this.fontSize,"start",!0),AmCharts.setCN(t,a,"legend-title"),a.translate(this.marginLeft,this.marginTop+this.verticalGap+this.ly+1),t=a.getBBox(),this.titleWidth=t.width+15,this.titleHeight=t.height+6;this.index=this.maxLabelWidth=0;if(this.showEntries){for(t=0;t<h.length;t++)this.createEntry(h[t]);for(t=this.index=0;t<h.length;t++)this.createValue(h[t])}this.arrangeEntries();this.updateValues()},arrangeEntries:function(){var t=this.position,e=this.marginLeft+this.titleWidth,i=this.marginRight,s=this.marginTop,a=this.marginBottom,r=this.horizontalGap,h=this.div,o=this.divWidth,n=this.maxColumns,l=this.verticalGap,d=this.spacing,c=o-i-e,u=0,m=0,p=this.container;this.set&&this.set.remove();var f=p.set();this.set=f;var g=p.set();f.push(g);var v=this.entries,C,A;for(A=0;A<v.length;A++){C=v[A].getBBox();var b=C.width;b>u&&(u=b);C=C.height;C>m&&(m=C)}var b=m=0,x=r,N=0,y=0;for(A=0;A<v.length;A++){var w=v[A];this.reversedOrder&&(w=v[v.length-A-1]);C=w.getBBox();var M;this.equalWidths?M=r+b*(u+d+this.markerLabelGap):(M=x,x=x+C.width+r+d);C.height>y&&(y=C.height);M+C.width>c&&0<A&&0!==b&&(m++,b=0,M=r,x=M+C.width+r+d,N=N+y+l,y=0);w.translate(M,N);b++;!isNaN(n)&&b>=n&&(b=0,m++,N=N+y+l,y=0);g.push(w)}C=g.getBBox();n=C.height+2*l-1;"left"==t||"right"==t?(o=C.width+2*r,h.style.width=o+e+i+"px"):o=o-e-i-1;i=AmCharts.polygon(this.container,[0,o,o,0],[0,0,n,n],this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);AmCharts.setCN(this.chart,i,"legend-bg");f.push(i);f.translate(e,s);i.toBack();e=r;if("top"==t||"bottom"==t||"absolute"==t||"outside"==t)"center"==this.align?e=r+(o-C.width)/2:"right"==this.align&&(e=r+o-C.width);g.translate(e,l+1);this.titleHeight>n&&(n=this.titleHeight);t=n+s+a+1;0>t&&(t=0);t>this.chart.divRealHeight&&(h.style.top="0px");h.style.height=Math.round(t)+"px";p.setSize(this.divWidth,t)},createEntry:function(t){if(!1!==t.visibleInLegend){var e=this.chart,i=t.markerType;t.legendEntryWidth=this.markerSize;i||(i=this.markerType);var s=t.color,a=t.alpha;t.legendKeyColor&&(s=t.legendKeyColor());t.legendKeyAlpha&&(a=t.legendKeyAlpha());var r;!0===t.hidden&&(r=s=this.markerDisabledColor);var h=t.pattern,o=t.customMarker;o||(o=this.customMarker);var n=this.container,l=this.markerSize,d=0,c=0,u=l/2;if(this.useGraphSettings){i=t.type;this.switchType=void 0;if("line"==i||"step"==i||"smoothedLine"==i||"ohlc"==i)h=n.set(),t.hidden||(s=t.lineColorR,r=t.bulletBorderColorR),d=AmCharts.line(n,[0,2*l],[l/2,l/2],s,t.lineAlpha,t.lineThickness,t.dashLength),AmCharts.setCN(e,d,"graph-stroke"),h.push(d),t.bullet&&(t.hidden||(s=t.bulletColorR),d=AmCharts.bullet(n,t.bullet,t.bulletSize,s,t.bulletAlpha,t.bulletBorderThickness,r,t.bulletBorderAlpha))&&(AmCharts.setCN(e,d,"graph-bullet"),d.translate(l+1,l/2),h.push(d)),u=0,d=l,c=l/3;else{var m;t.getGradRotation&&(m=t.getGradRotation());d=t.fillColorsR;!0===t.hidden&&(d=s);if(h=this.createMarker("rectangle",d,t.fillAlphas,t.lineThickness,s,t.lineAlpha,m,h))u=l,h.translate(u,l/2);d=l}AmCharts.setCN(e,h,"graph-"+i);AmCharts.setCN(e,h,"graph-"+t.id)}else o?(e.path&&(o=e.path+o),h=n.image(o,0,0,l,l)):(h=this.createMarker(i,s,a,void 0,void 0,void 0,void 0,h))&&h.translate(l/2,l/2);AmCharts.setCN(e,h,"legend-marker");this.addListeners(h,t);n=n.set([h]);this.switchable&&t.switchable&&n.setAttr("cursor","pointer");void 0!=t.id&&AmCharts.setCN(e,n,"legend-item-"+t.id);AmCharts.setCN(e,n,t.className,!0);(r=this.switchType)&&"none"!=r&&("x"==r?(i=this.createX(),i.translate(l/2,l/2)):i=this.createV(),i.dItem=t,!0!==t.hidden?"x"==r?i.hide():i.show():"x"!=r&&i.hide(),this.switchable||i.hide(),this.addListeners(i,t),t.legendSwitch=i,n.push(i),AmCharts.setCN(e,i,"legend-switch"));r=this.color;t.showBalloon&&this.textClickEnabled&&void 0!==this.selectedColor&&(r=this.selectedColor);this.useMarkerColorForLabels&&(r=s);!0===t.hidden&&(r=this.markerDisabledColor);s=AmCharts.massReplace(this.labelText,{"[[title]]":t.title});i=this.fontSize;h&&(l<=i&&h.translate(u,l/2+this.ly-i/2+(i+2-l)/2-c),t.legendEntryWidth=h.getBBox().width);var p;s&&(s=AmCharts.fixBrakes(s),t.legendTextReal=s,p=this.labelWidth,p=isNaN(p)?AmCharts.text(this.container,s,r,e.fontFamily,i,"start"):AmCharts.wrappedText(this.container,s,r,e.fontFamily,i,"start",!1,p,0),AmCharts.setCN(e,p,"legend-label"),p.translate(this.lx+d,this.ly),n.push(p),e=p.getBBox().width,this.maxLabelWidth<e&&(this.maxLabelWidth=e));this.entries[this.index]=n;t.legendEntry=this.entries[this.index];t.legendLabel=p;this.index++}},addListeners:function(t,e){var i=this;t&&t.mouseover(function(t){i.rollOverMarker(e,t)}).mouseout(function(t){i.rollOutMarker(e,t)}).click(function(t){i.clickMarker(e,t)})},rollOverMarker:function(t,e){this.switchable&&this.dispatch("rollOverMarker",t,e);this.dispatch("rollOverItem",t,e)},rollOutMarker:function(t,e){this.switchable&&this.dispatch("rollOutMarker",t,e);this.dispatch("rollOutItem",t,e)},clickMarker:function(t,e){this.switchable&&(!0===t.hidden?this.dispatch("showItem",t,e):this.dispatch("hideItem",t,e));this.dispatch("clickMarker",t,e)},rollOverLabel:function(t,e){t.hidden||(this.textClickEnabled&&t.legendLabel&&t.legendLabel.attr({
fill:this.rollOverColor}),this.dispatch("rollOverItem",t,e))},rollOutLabel:function(t,e){if(!t.hidden){if(this.textClickEnabled&&t.legendLabel){var i=this.color;void 0!==this.selectedColor&&t.showBalloon&&(i=this.selectedColor);this.useMarkerColorForLabels&&(i=t.lineColor,void 0===i&&(i=t.color));t.legendLabel.attr({fill:i})}this.dispatch("rollOutItem",t,e)}},clickLabel:function(t,e){this.textClickEnabled?t.hidden||this.dispatch("clickLabel",t,e):this.switchable&&(!0===t.hidden?this.dispatch("showItem",t,e):this.dispatch("hideItem",t,e))},dispatch:function(t,e,i){this.fire(t,{type:t,dataItem:e,target:this,event:i,chart:this.chart})},createValue:function(t){var e=this,i=e.fontSize,s=e.chart;if(!1!==t.visibleInLegend){var a=e.maxLabelWidth;e.forceWidth&&(a=e.labelWidth);e.equalWidths||(e.valueAlign="left");"left"==e.valueAlign&&(a=t.legendEntry.getBBox().width);var r=a;if(e.valueText&&0<e.valueWidth){var h=e.color;e.useMarkerColorForValues&&(h=t.color,t.legendKeyColor&&(h=t.legendKeyColor()));!0===t.hidden&&(h=e.markerDisabledColor);var o=e.valueText,a=a+e.lx+e.markerLabelGap+e.valueWidth,n="end";"left"==e.valueAlign&&(a-=e.valueWidth,n="start");h=AmCharts.text(e.container,o,h,e.chart.fontFamily,i,n);AmCharts.setCN(s,h,"legend-value");h.translate(a,e.ly);e.entries[e.index].push(h);r+=e.valueWidth+2*e.markerLabelGap;h.dItem=t;e.valueLabels.push(h)}e.index++;s=e.markerSize;s<i+7&&(s=i+7,AmCharts.VML&&(s+=3));i=e.container.rect(t.legendEntryWidth,0,r,s,0,0).attr({stroke:"none",fill:"#fff","fill-opacity":.005});i.dItem=t;e.entries[e.index-1].push(i);i.mouseover(function(i){e.rollOverLabel(t,i)}).mouseout(function(i){e.rollOutLabel(t,i)}).click(function(i){e.clickLabel(t,i)})}},createV:function(){var t=this.markerSize;return AmCharts.polygon(this.container,[t/5,t/2,t-t/5,t/2],[t/3,t-t/5,t/5,t/1.7],this.switchColor)},createX:function(){var t=(this.markerSize-4)/2,e={stroke:this.switchColor,"stroke-width":3},i=this.container,s=AmCharts.line(i,[-t,t],[-t,t]).attr(e),t=AmCharts.line(i,[-t,t],[t,-t]).attr(e);return this.container.set([s,t])},createMarker:function(t,e,i,s,a,r,h,o){var n=this.markerSize,l=this.container;a||(a=this.markerBorderColor);a||(a=e);isNaN(s)&&(s=this.markerBorderThickness);isNaN(r)&&(r=this.markerBorderAlpha);return AmCharts.bullet(l,t,n,e,i,s,a,r,n,h,o)},validateNow:function(){this.invalidateSize()},updateValues:function(){var t=this.valueLabels,e=this.chart,i,s=this.data;for(i=0;i<t.length;i++){var a=t[i],r=a.dItem,h=" ";if(s)r.value?a.text(r.value):a.text("");else{if(void 0!==r.type){var o=r.currentDataItem,n=this.periodValueText;r.legendPeriodValueText&&(n=r.legendPeriodValueText);o?(h=this.valueText,r.legendValueText&&(h=r.legendValueText),h=e.formatString(h,o)):n&&(h=e.formatPeriodString(n,r))}else h=e.formatString(this.valueText,r);if(n=this.valueFunction)o&&(r=o),h=n(r,h);a.text(h)}}},renderFix:function(){if(!AmCharts.VML){var t=this.container;t&&t.renderFix()}},destroy:function(){this.div.innerHTML="";AmCharts.remove(this.set)}});AmCharts.formatMilliseconds=function(t,e){if(-1!=t.indexOf("fff")){var i=e.getMilliseconds(),s=String(i);10>i&&(s="00"+i);10<=i&&100>i&&(s="0"+i);t=t.replace(/fff/g,s)}return t};AmCharts.extractPeriod=function(t){var e=AmCharts.stripNumbers(t),i=1;e!=t&&(i=Number(t.slice(0,t.indexOf(e))));return{period:e,count:i}};AmCharts.newDate=function(t,e){return"fff"==e?AmCharts.useUTC?new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()):new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()):new Date(t)};AmCharts.resetDateToMin=function(t,e,i,s){void 0===s&&(s=1);var a,r,h,o,n,l,d;AmCharts.useUTC?(a=t.getUTCFullYear(),r=t.getUTCMonth(),h=t.getUTCDate(),o=t.getUTCHours(),n=t.getUTCMinutes(),l=t.getUTCSeconds(),d=t.getUTCMilliseconds(),t=t.getUTCDay()):(a=t.getFullYear(),r=t.getMonth(),h=t.getDate(),o=t.getHours(),n=t.getMinutes(),l=t.getSeconds(),d=t.getMilliseconds(),t=t.getDay());switch(e){case"YYYY":a=Math.floor(a/i)*i;r=0;h=1;d=l=n=o=0;break;case"MM":r=Math.floor(r/i)*i;h=1;d=l=n=o=0;break;case"WW":h=t>=s?h-t+s:h-(7+t)+s;d=l=n=o=0;break;case"DD":d=l=n=o=0;break;case"hh":o=Math.floor(o/i)*i;d=l=n=0;break;case"mm":n=Math.floor(n/i)*i;d=l=0;break;case"ss":l=Math.floor(l/i)*i;d=0;break;case"fff":d=Math.floor(d/i)*i}AmCharts.useUTC?(t=new Date,t.setUTCFullYear(a,r,h),t.setUTCHours(o,n,l,d)):t=new Date(a,r,h,o,n,l,d);return t};AmCharts.getPeriodDuration=function(t,e){void 0===e&&(e=1);var i;switch(t){case"YYYY":i=316224e5;break;case"MM":i=26784e5;break;case"WW":i=6048e5;break;case"DD":i=864e5;break;case"hh":i=36e5;break;case"mm":i=6e4;break;case"ss":i=1e3;break;case"fff":i=1}return i*e};AmCharts.intervals={s:{nextInterval:"ss",contains:1e3},ss:{nextInterval:"mm",contains:60,count:0},mm:{nextInterval:"hh",contains:60,count:1},hh:{nextInterval:"DD",contains:24,count:2},DD:{nextInterval:"",contains:Infinity,count:3}};AmCharts.getMaxInterval=function(t,e){var i=AmCharts.intervals;return t>=i[e].contains?(t=Math.round(t/i[e].contains),e=i[e].nextInterval,AmCharts.getMaxInterval(t,e)):"ss"==e?i[e].nextInterval:e};AmCharts.dayNames="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ");AmCharts.shortDayNames="Sun Mon Tue Wed Thu Fri Sat".split(" ");AmCharts.monthNames="January February March April May June July August September October November December".split(" ");AmCharts.shortMonthNames="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");AmCharts.getWeekNumber=function(t){t=new Date(t);t.setHours(0,0,0);t.setDate(t.getDate()+4-(t.getDay()||7));var e=new Date(t.getFullYear(),0,1);return Math.ceil(((t-e)/864e5+1)/7)};AmCharts.stringToDate=function(t,e){var i={},s=[{pattern:"YYYY",period:"year"},{pattern:"YY",period:"year"},{pattern:"MM",period:"month"},{pattern:"M",period:"month"},{pattern:"DD",period:"date"},{pattern:"D",period:"date"},{pattern:"JJ",period:"hours"},{pattern:"J",period:"hours"},{pattern:"HH",period:"hours"},{pattern:"H",period:"hours"},{pattern:"KK",period:"hours"},{pattern:"K",period:"hours"},{pattern:"LL",period:"hours"},{pattern:"L",period:"hours"},{pattern:"NN",period:"minutes"},{pattern:"N",period:"minutes"},{pattern:"SS",period:"seconds"},{pattern:"S",period:"seconds"},{pattern:"QQQ",period:"milliseconds"},{pattern:"QQ",period:"milliseconds"},{pattern:"Q",period:"milliseconds"}],a=!0,r=e.indexOf("AA");-1!=r&&(t.substr(r,2),"pm"==t.toLowerCase&&(a=!1));var r=e,h,o,n;for(n=0;n<s.length;n++)o=s[n].period,i[o]=0,"date"==o&&(i[o]=1);for(n=0;n<s.length;n++)if(h=s[n].pattern,o=s[n].period,-1!=e.indexOf(h)){var l=AmCharts.getFromDateString(h,t,r);e=e.replace(h,"");if("KK"==h||"K"==h||"LL"==h||"L"==h)a||(l+=12);i[o]=l}AmCharts.useUTC?(s=new Date,s.setUTCFullYear(i.year,i.month,i.date),s.setUTCHours(i.hours,i.minutes,i.seconds,i.milliseconds)):s=new Date(i.year,i.month,i.date,i.hours,i.minutes,i.seconds,i.milliseconds);return s};AmCharts.getFromDateString=function(t,e,i){if(void 0!==e)return i=i.indexOf(t),e=String(e),e=e.substr(i,t.length),"0"==e.charAt(0)&&(e=e.substr(1,e.length-1)),e=Number(e),isNaN(e)&&(e=0),-1!=t.indexOf("M")&&e--,e};AmCharts.formatDate=function(t,e,i){i||(i=AmCharts);var s,a,r,h,o,n,l,d=AmCharts.getWeekNumber(t);AmCharts.useUTC?(s=t.getUTCFullYear(),a=t.getUTCMonth(),r=t.getUTCDate(),h=t.getUTCDay(),o=t.getUTCHours(),n=t.getUTCMinutes(),l=t.getUTCSeconds(),t=t.getUTCMilliseconds()):(s=t.getFullYear(),a=t.getMonth(),r=t.getDate(),h=t.getDay(),o=t.getHours(),n=t.getMinutes(),l=t.getSeconds(),t=t.getMilliseconds());var c=String(s).substr(2,2),u=a+1;9>a&&(u="0"+u);var m="0"+h;e=e.replace(/W/g,d);d=o;24==d&&(d=0);var p=d;10>p&&(p="0"+p);e=e.replace(/JJ/g,p);e=e.replace(/J/g,d);p=o;0===p&&(p=24,-1!=e.indexOf("H")&&r--);d=r;10>r&&(d="0"+r);var f=p;10>f&&(f="0"+f);e=e.replace(/HH/g,f);e=e.replace(/H/g,p);p=o;11<p&&(p-=12);f=p;10>f&&(f="0"+f);e=e.replace(/KK/g,f);e=e.replace(/K/g,p);p=o;0===p&&(p=12);12<p&&(p-=12);f=p;10>f&&(f="0"+f);e=e.replace(/LL/g,f);e=e.replace(/L/g,p);p=n;10>p&&(p="0"+p);e=e.replace(/NN/g,p);e=e.replace(/N/g,n);n=l;10>n&&(n="0"+n);e=e.replace(/SS/g,n);e=e.replace(/S/g,l);l=t;10>l&&(l="00"+l);100>l&&(l="0"+l);n=t;10>n&&(n="00"+n);e=e.replace(/QQQ/g,l);e=e.replace(/QQ/g,n);e=e.replace(/Q/g,t);e=12>o?e.replace(/A/g,"am"):e.replace(/A/g,"pm");e=e.replace(/YYYY/g,"@IIII@");e=e.replace(/YY/g,"@II@");e=e.replace(/MMMM/g,"@XXXX@");e=e.replace(/MMM/g,"@XXX@");e=e.replace(/MM/g,"@XX@");e=e.replace(/M/g,"@X@");e=e.replace(/DD/g,"@RR@");e=e.replace(/D/g,"@R@");e=e.replace(/EEEE/g,"@PPPP@");e=e.replace(/EEE/g,"@PPP@");e=e.replace(/EE/g,"@PP@");e=e.replace(/E/g,"@P@");e=e.replace(/@IIII@/g,s);e=e.replace(/@II@/g,c);e=e.replace(/@XXXX@/g,i.monthNames[a]);e=e.replace(/@XXX@/g,i.shortMonthNames[a]);e=e.replace(/@XX@/g,u);e=e.replace(/@X@/g,a+1);e=e.replace(/@RR@/g,d);e=e.replace(/@R@/g,r);e=e.replace(/@PPPP@/g,i.dayNames[h]);e=e.replace(/@PPP@/g,i.shortDayNames[h]);e=e.replace(/@PP@/g,m);return e=e.replace(/@P@/g,h)};AmCharts.changeDate=function(t,e,i,s,a){if(AmCharts.useUTC)return AmCharts.changeUTCDate(t,e,i,s,a);var r=-1;void 0===s&&(s=!0);void 0===a&&(a=!1);!0===s&&(r=1);switch(e){case"YYYY":t.setFullYear(t.getFullYear()+i*r);s||a||t.setDate(t.getDate()+1);break;case"MM":e=t.getMonth();t.setMonth(t.getMonth()+i*r);t.getMonth()>e+i*r&&t.setDate(t.getDate()-1);s||a||t.setDate(t.getDate()+1);break;case"DD":t.setDate(t.getDate()+i*r);break;case"WW":t.setDate(t.getDate()+i*r*7);break;case"hh":t.setHours(t.getHours()+i*r);break;case"mm":t.setMinutes(t.getMinutes()+i*r);break;case"ss":t.setSeconds(t.getSeconds()+i*r);break;case"fff":t.setMilliseconds(t.getMilliseconds()+i*r)}return t};AmCharts.changeUTCDate=function(t,e,i,s,a){var r=-1;void 0===s&&(s=!0);void 0===a&&(a=!1);!0===s&&(r=1);switch(e){case"YYYY":t.setUTCFullYear(t.getUTCFullYear()+i*r);s||a||t.setUTCDate(t.getUTCDate()+1);break;case"MM":e=t.getUTCMonth();t.setUTCMonth(t.getUTCMonth()+i*r);t.getUTCMonth()>e+i*r&&t.setUTCDate(t.getUTCDate()-1);s||a||t.setUTCDate(t.getUTCDate()+1);break;case"DD":t.setUTCDate(t.getUTCDate()+i*r);break;case"WW":t.setUTCDate(t.getUTCDate()+i*r*7);break;case"hh":t.setUTCHours(t.getUTCHours()+i*r);break;case"mm":t.setUTCMinutes(t.getUTCMinutes()+i*r);break;case"ss":t.setUTCSeconds(t.getUTCSeconds()+i*r);break;case"fff":t.setUTCMilliseconds(t.getUTCMilliseconds()+i*r)}return t};
//# sourceMappingURL=amcharts.map.js